root password removed from Receşved message

This commit is contained in:
Tuncay ÇOLAK 2019-09-20 16:47:46 +03:00
parent b87e7a36e9
commit 718999e4ef

View file

@ -99,7 +99,15 @@ class Messenger(ClientXMPP):
def recv_direct_message(self, msg): def recv_direct_message(self, msg):
if msg['type'] in ['normal']: if msg['type'] in ['normal']:
self.logger.info('---------->Received message: {0}'.format(str(msg['body']))) j = json.loads(str(msg['body']))
i = json.loads(str(j['task']))
plugin_name = i['plugin']['name']
if not plugin_name == "manage-root":
self.logger.info('---------->Received message: {0}'.format(str(msg['body'])))
else:
parameter_map = i['parameterMap']
parameter_map.pop("RootPassword")
self.logger.info("---------->Received message: {}".format(str(parameter_map)))
try: try:
j = json.loads(str(msg['body'])) j = json.loads(str(msg['body']))
message_type = j['type'] message_type = j['type']