Update server.py

This commit is contained in:
Namhyeon Go 2024-02-19 18:56:41 +09:00 committed by GitHub
parent 403e497fc0
commit 23eb725295
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -405,7 +405,7 @@ def pwnedpasswords_test(s):
hashes = response.text.split('\r\n')
# Using list comprehension to find matching hashes
matching_hashes = [line for line in hashes if l5_sha1 in line.lower()]
matching_hashes = [line.split(':')[0] for line in hashes if line.endswith(l5_sha1)]
# If there are matching hashes, return True, else return False
return bool(matching_hashes)