Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe0ad54

Browse files
committed
minorsymfony#17641 [Security] Prevent unneeded implementation ofPasswordHasherAwareInterface when migrating passwords (MatTheCat)
This PR was squashed before being merged into the 6.2 branch.Discussion----------[Security] Prevent unneeded implementation of `PasswordHasherAwareInterface` when migrating passwordsTrying to avoid issues likesymfony/symfony#48348 orsymfony/symfony#48825Commits-------1d09493 [Security] Prevent unneeded implementation of `PasswordHasherAwareInterface` when migrating passwords
2 parents666ee59 +1d09493 commitbe0ad54

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎security/passwords.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Further in this article, you can find a
123123
..configuration-block::
124124

125125
..code-block::yaml
126-
126+
127127
# config/packages/test/security.yaml
128128
security:
129129
# ...
@@ -533,8 +533,10 @@ migration by returning ``true`` in the ``needsRehash()`` method::
533533
}
534534
}
535535

536-
Named Password Hashers
537-
----------------------
536+
.. _named-password-hashers:
537+
538+
Dynamic Password Hashers
539+
------------------------
538540

539541
Usually, the same password hasher is used for all users by configuring it
540542
to apply to all instances of a specific class. Another option is to use a
@@ -635,6 +637,12 @@ the name of the hasher to use::
635637
}
636638
}
637639

640+
..caution::
641+
642+
When:ref:`migrating passwords<security-password-migration>`, you don't need to implement ``PasswordHasherAwareInterface``
643+
to return the legacy hasher name:
644+
Symfony will detect it from your ``migrate_from`` configuration.
645+
638646
If you created your own password hasher implementing the
639647
:class:`Symfony\\Component\\PasswordHasher\\PasswordHasherInterface`,
640648
you must register a service for it in order to use it as a named hasher:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp