From 718999e4ef3026086807647adc8297d7ad6cc9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuncay=20=C3=87OLAK?= Date: Fri, 20 Sep 2019 16:47:46 +0300 Subject: [PATCH] =?UTF-8?q?root=20password=20removed=20from=20Rece=C5=9Fve?= =?UTF-8?q?d=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/messaging/messenger.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/base/messaging/messenger.py b/src/base/messaging/messenger.py index 161b647..bd8ec8b 100644 --- a/src/base/messaging/messenger.py +++ b/src/base/messaging/messenger.py @@ -99,7 +99,15 @@ class Messenger(ClientXMPP): def recv_direct_message(self, msg): 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: j = json.loads(str(msg['body'])) message_type = j['type']