fix bandit error (SHA1 has to be used)

This commit is contained in:
Jens Langhammer 2019-02-25 17:23:42 +01:00
parent 10d6a30f2c
commit b8694a7ade
1 changed files with 1 additions and 1 deletions

View File

@ -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