Some bug fixes.

This commit is contained in:
James Cole
2020-10-01 16:52:01 +02:00
parent d32611b2d5
commit c25f5598f1
3 changed files with 5 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ class PwndVerifierV2 implements Verifier
*/
public function validPassword(string $password): bool
{
// Yes SHA1 is unsafe but in this context its fine.
$hash = sha1($password);
$prefix = substr($hash, 0, 5);
$rest = substr($hash, 5);