From 90c35a2dae2e0d8adfcac7b0c68816e1c5a8dfac Mon Sep 17 00:00:00 2001 From: Rune Henriksen Date: Thu, 19 Mar 2020 22:21:03 +0100 Subject: [PATCH] fix FIPS mode compatibility Issue is almost identical to https://github.com/s3tools/s3cmd/issues/1005 --- zabbix/zabbix_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix/zabbix_api.py b/zabbix/zabbix_api.py index 4d4c346..b214db5 100644 --- a/zabbix/zabbix_api.py +++ b/zabbix/zabbix_api.py @@ -200,7 +200,7 @@ def login(self, user='', password='', save=True): raise ZabbixAPIException("No authentication information available.") # don't print the raw password. - hashed_pw_string = "md5(" + hashlib.md5(l_password.encode('utf-8')).hexdigest() + ")" + hashed_pw_string = "md5(" + hashlib.md5(l_password.encode('utf-8'), usedforsecurity=False).hexdigest() + ")" self.debug(logging.DEBUG, "Trying to login with %s:%s" % (repr(l_user), repr(hashed_pw_string))) obj = self.json_obj('user.login', {'user': l_user, 'password': l_password}, auth=False)