Skip to content

Commit

Permalink
fix FIPS mode compatibility
Browse files Browse the repository at this point in the history
Issue is almost identical to s3tools/s3cmd#1005
  • Loading branch information
Rune Henriksen authored Mar 19, 2020
1 parent 721dba6 commit 90c35a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zabbix/zabbix_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 90c35a2

Please sign in to comment.