[PasswordHasher] UserPasswordHasher only calls getSalt when method exists#41755
[PasswordHasher] UserPasswordHasher only calls getSalt when method exists#41755derrabus merged 1 commit intosymfony:5.3from
Conversation
| Q | A |
|---|---|
| Branch? | 5.3 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | Fix #41753 |
| License | MIT |
src/Symfony/Component/PasswordHasher/Tests/Hasher/UserPasswordHasherTest.php
Show resolved
Hide resolved
|
Thanks for the perfect report and the patch, Denis. |
|
If a user class already implements |
|
Very good question. But, the current code (before this patch) assumes that if your user class is not implementing This patch basically removes that assumption. And actually, because We could consider this a too edge case for supporting it. |
Sure thing, but probably not today. |
|
@chalasr as far as I can tell, the other places do not (yet) need this change, because all occurrences I could find where getting the user via |
|
Thanks for confirming. |
src/Symfony/Component/PasswordHasher/Tests/Fixtures/TestLegacyPasswordAuthenticatedUser.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/PasswordHasher/Hasher/UserPasswordHasher.php
Outdated
Show resolved
Hide resolved
|
Good catch, thanks Denis. |