Merge "Directly using base64 encoding for injected files"
This commit is contained in:
commit
0f7bf49388
@ -506,7 +506,9 @@ class ServerManager(base.BootingManagerWithFind):
|
||||
else:
|
||||
data = file_or_string
|
||||
|
||||
cont = base64.b64encode(data.encode('utf-8')).decode('utf-8')
|
||||
if six.PY3 and isinstance(data, str):
|
||||
data = data.encode('utf-8')
|
||||
cont = base64.b64encode(data).decode('utf-8')
|
||||
personality.append({
|
||||
'path': filepath,
|
||||
'contents': cont,
|
||||
|
Loading…
x
Reference in New Issue
Block a user