mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-21 22:02:15 +03:00
password param fixed for ad
This commit is contained in:
parent
e7fdfdca74
commit
8d4a2257b9
2 changed files with 6 additions and 4 deletions
|
@ -103,12 +103,13 @@ class AnonymousMessenger(ClientXMPP):
|
|||
dn = str(j['agentDn'])
|
||||
self.logger.debug('Registration status: ' + str(status))
|
||||
is_password = False
|
||||
for key, value in j.items():
|
||||
body_without_password = json.loads(str(msg['body']))
|
||||
for key, value in body_without_password.items():
|
||||
if "password" in key.lower():
|
||||
j[key] = "********"
|
||||
body_without_password[key] = "********"
|
||||
is_password = True
|
||||
if is_password:
|
||||
self.logger.info('---------->Received message: {0}'.format(str(j)))
|
||||
self.logger.info('---------->Received message: {0}'.format(str(body_without_password)))
|
||||
else:
|
||||
self.logger.info('---------->Received message: {0}'.format(str(msg['body'])))
|
||||
|
||||
|
|
|
@ -362,6 +362,7 @@ class ExecuteSSSDAdAuthentication:
|
|||
try:
|
||||
process = subprocess.Popen(command, stdin=stdin, env=env, cwd=cwd, stderr=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, shell=shell)
|
||||
self.logger.debug('Executing command for ad registration')
|
||||
if result is True:
|
||||
result_code = process.wait()
|
||||
p_out = process.stdout.read().decode("unicode_escape")
|
||||
|
@ -370,5 +371,5 @@ class ExecuteSSSDAdAuthentication:
|
|||
else:
|
||||
return None, None, None
|
||||
except Exception as e:
|
||||
return 1, 'Could not execute command'
|
||||
return 1, 'Error Message: {0}'.format(str(e)), ''
|
||||
|
||||
|
|
Loading…
Reference in a new issue