Navigation Menu

Skip to content

Commit

Permalink
Apply hashing to empty passwords as well.
Browse files Browse the repository at this point in the history
Only when the password is null should hashing be skipped.
  • Loading branch information
markstory committed Aug 16, 2018
1 parent 6e9b334 commit 6c14438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Auth/BaseAuthenticate.php
Expand Up @@ -122,7 +122,7 @@ protected function _findUser($username, $password = null)
// null passwords as authentication systems
// like digest auth don't use passwords
// and hashing *could* create a timing side-channel.
if (strlen($password) > 0) {
if ($password !== null) {
$hasher = $this->passwordHasher();
$hasher->hash($password);
}
Expand Down

0 comments on commit 6c14438

Please sign in to comment.