You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument 1 passed to Symfony\Component\Security\Core\Encoder\MigratingPasswordEncoder::needsRehash() must be of the type string, null given, called in (...)/vendor/symfony/security-http/EventListener/PasswordMigratingListener.php on line 54
How to reproduce
Maybe trivial: create a standard authentication setup using a custom User class, which returns null in the getPassword() method. When logging in, the mentioned exception occurs.
The text was updated successfully, but these errors were encountered:
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Do not try to rehash null-passwords
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41005
| License | MIT
| Doc PR | -
Make sure no exception occurs when a passwordless user logs in.
Commits
-------
a2a944e [Security] Do not try to rehash null-passwords
Symfony version(s) affected: 5.2.x
Description
UserInterface::getPassword() is allowed to return a null value. In case it does, PasswordMigratingListener::onLoginSuccess calling PasswordEncoderInterface::needsRehash fails because that does not allow null input:
How to reproduce
Maybe trivial: create a standard authentication setup using a custom User class, which returns
null
in thegetPassword()
method. When logging in, the mentioned exception occurs.The text was updated successfully, but these errors were encountered: