mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Fix AC-699 by using the spawnu interface on pexpect3 and making sure we use the right encoding on passwords passed to the cipher
This commit is contained in:
@@ -350,7 +350,7 @@ class Credential(CommonModelNameNotUnique):
|
|||||||
# if hit hasn't been specified, then we're just doing a normal save.
|
# if hit hasn't been specified, then we're just doing a normal save.
|
||||||
for field in self.PASSWORD_FIELDS:
|
for field in self.PASSWORD_FIELDS:
|
||||||
ask = bool(self.kind == 'ssh' and field != 'ssh_key_data')
|
ask = bool(self.kind == 'ssh' and field != 'ssh_key_data')
|
||||||
encrypted = encrypt_field(self, field, ask)
|
encrypted = encrypt_field(self, field, ask.encode('utf-8'))
|
||||||
setattr(self, field, encrypted)
|
setattr(self, field, encrypted)
|
||||||
if field not in update_fields:
|
if field not in update_fields:
|
||||||
update_fields.append(field)
|
update_fields.append(field)
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ class BaseTask(Task):
|
|||||||
status, stdout = 'error', ''
|
status, stdout = 'error', ''
|
||||||
logfile = task_stdout_handle
|
logfile = task_stdout_handle
|
||||||
logfile_pos = logfile.tell()
|
logfile_pos = logfile.tell()
|
||||||
child = pexpect.spawn(args[0], args[1:], cwd=cwd, env=env)
|
child = pexpect.spawnu(args[0], args[1:], cwd=cwd, env=env)
|
||||||
child.logfile_read = logfile
|
child.logfile_read = logfile
|
||||||
canceled = False
|
canceled = False
|
||||||
last_stdout_update = time.time()
|
last_stdout_update = time.time()
|
||||||
|
|||||||
Reference in New Issue
Block a user