From b8694a7adedaa2645c9793114e14a05cc6d37251 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 25 Feb 2019 17:23:42 +0100 Subject: [PATCH] fix bandit error (SHA1 has to be used) --- passbook/hibp_policy/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passbook/hibp_policy/models.py b/passbook/hibp_policy/models.py index 8474b03f7..3b19a2264 100644 --- a/passbook/hibp_policy/models.py +++ b/passbook/hibp_policy/models.py @@ -25,7 +25,7 @@ class HaveIBeenPwendPolicy(Policy): if not hasattr(user, '__password__'): return True password = getattr(user, '__password__') - pw_hash = sha1(password.encode('utf-8')).hexdigest() + pw_hash = sha1(password.encode('utf-8')).hexdigest() # nosec url = 'https://api.pwnedpasswords.com/range/%s' % pw_hash[:5] result = get(url).text final_count = 0