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)