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
bug #41703 [Security] Restore extension point in MessageDigestPasswordEncoder (derrabus)
This PR was merged into the 5.3 branch.
Discussion
----------
[Security] Restore extension point in MessageDigestPasswordEncoder
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #41696 (comment)
| License | MIT
| Doc PR | N/A
Until Symfony 5.2, it was possible to extend `MessageDigestPasswordEncoder` and override the way password and salt are merged. This broke with #39802. I've restored the old logic and added a test case to cover that scenario.
Commits
-------
4568876 [Security] Restore extension point in MessageDigestPasswordEncoder
trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', MessageDigestPasswordEncoder::class, MessageDigestPasswordHasher::class);
17
18
@@ -24,7 +25,10 @@
24
25
*/
25
26
class MessageDigestPasswordEncoder extends BasePasswordEncoder
26
27
{
27
-
use LegacyEncoderTrait;
28
+
private$algorithm;
29
+
private$encodeHashAsBase64;
30
+
private$iterations = 1;
31
+
private$encodedLength = -1;
28
32
29
33
/**
30
34
* @param string $algorithm The digest algorithm to use
@@ -33,6 +37,51 @@ class MessageDigestPasswordEncoder extends BasePasswordEncoder
0 commit comments