Skip to content

Commit dca6cf4

Browse files
committed
[Security] bcrypt is the new default hasher for native/auto
1 parent 14ff17d commit dca6cf4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

best_practices.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Use the ``auto`` Password Hasher
368368

369369
The :ref:`auto password hasher <reference-security-encoder-auto>` automatically
370370
selects the best possible encoder/hasher depending on your PHP installation.
371-
Currently, it tries to use ``sodium`` by default and falls back to ``bcrypt``.
371+
Starting from Symfony 5.3, the default auto hasher is ``bcrypt``.
372372

373373
Use Voters to Implement Fine-grained Security Restrictions
374374
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

security.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,8 @@ command will pre-configure this for you:
219219
encoders:
220220
# use your user class name here
221221
App\Entity\User:
222-
# Use native password encoder
223-
# This value auto-selects the best possible hashing algorithm
224-
# (i.e. Sodium when available).
222+
# Use native password encoder, which auto-selects the best
223+
# possible hashing algorithm (starting from Symfony 5.3 this is "bcrypt")
225224
algorithm: auto
226225
227226
.. code-block:: xml

0 commit comments

Comments
 (0)