Closed mattlorimor closed 6 years ago
Totally my fault on not noticing that i had a :0
in there. It was causing the splits to look like this (given a SHA1 of '7c6a61c68ef8b9b6b061b28c348bc1ed7921cb53'
:
sha1_prefix: '7c6a6'
sha1_suffix: ''
When the sha1_suffix
should be '1c68ef8b9b6b061b28c348bc1ed7921cb53'
Thank you very much for fixing the bug - I just merged! I also fixed sha1_suffix
to be sha1_suffix.upper()
since HIBP shows the hashes in uppercase.
Makes sense.
No problem.
Also yes, the hash is supposed to be in "clear" hash form (not containing ":")!
This PR fixes a bug with determining the
sha1_suffix
.This should take care of the bug mentioned here: https://github.com/chrispetrou/FastAudit/pull/1.
That is, if
self.__pass
is purely a SHA1 hash. Ifself.__pass
looks exactly like this format, then another step needs to be added:7c6a61c68ef8b9b6b061b28c348bc1ed7921cb53:passw0rd
. Ifself.__pass
looks like this, then this PR should fix the issue:7c6a61c68ef8b9b6b061b28c348bc1ed7921cb53
.