Browse Source

Ensure input passwords will be hashed even when a user doesn't exist

Marc Ypes 8 years ago
parent
commit
fdb5bcdfeb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Auth/BaseAuthenticate.php

+ 3 - 0
src/Auth/BaseAuthenticate.php

@@ -107,6 +107,9 @@ abstract class BaseAuthenticate implements EventListenerInterface
         $result = $this->_query($username)->first();
 
         if (empty($result)) {
+            $hasher = $this->passwordHasher();
+            $hasher->hash((string)$password);
+
             return false;
         }