Skip to content

Commit a2e1c8b

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: [Security] update description of password hasher config Update chatters.rst
2 parents 50e5a45 + ab15460 commit a2e1c8b

File tree

3 files changed

+34
-25
lines changed

3 files changed

+34
-25
lines changed

deployment.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ How to Deploy a Symfony Application
77
===================================
88

99
Deploying a Symfony application can be a complex and varied task depending on
10-
the setup and the requirements of your application. This article is not a step-
11-
by-step guide, but is a general list of the most common requirements and ideas
12-
for deployment.
10+
the setup and the requirements of your application. This article is not a
11+
step-by-step guide, but is a general list of the most common requirements and
12+
ideas for deployment.
1313

1414
.. _symfony2-deployment-basics:
1515

notifier/chatters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ to add some interactive options called `Block elements`_::
5959

6060
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackActionsBlock;
6161
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackDividerBlock;
62-
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackImageBlock;
62+
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackImageBlockElement;
6363
use Symfony\Component\Notifier\Bridge\Slack\Block\SlackSectionBlock;
6464
use Symfony\Component\Notifier\Bridge\Slack\SlackOptions;
6565
use Symfony\Component\Notifier\Message\ChatMessage;

reference/configuration/security.rst

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -319,35 +319,28 @@ hashing algorithm. Also, each algorithm defines different config options:
319319
;
320320
};
321321
322-
.. _reference-security-sodium:
323-
.. _using-the-argon2i-password-encoder:
324-
.. _using-the-sodium-password-encoder:
325-
326-
Using the Sodium Password Hasher
327-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
328-
329-
It uses the `Argon2 key derivation function`_ and it's the hasher recommended
330-
by Symfony. Argon2 support was introduced in PHP 7.2, but if you use an earlier
331-
PHP version, you can install the `libsodium`_ PHP extension.
332-
333-
The hashed passwords are ``96`` characters long, but due to the hashing
334-
requirements saved in the resulting hash this may change in the future, so make
335-
sure to allocate enough space for them to be persisted. Also, passwords include
336-
the `cryptographic salt`_ inside them (it's generated automatically for each new
337-
password) so you don't have to deal with it.
338322
339323
.. _reference-security-encoder-auto:
340324
.. _using-the-auto-password-encoder:
341325

342326
Using the "auto" Password Hasher
343327
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
344328

345-
It selects automatically the best possible hasher. Currently, it tries to use
346-
Sodium by default and falls back to the `bcrypt password hashing function`_ if
347-
not possible. In the future, when PHP adds new hashing techniques, it may use
348-
different password hashers.
329+
It automatically selects the best available hasher. Starting from Symfony 5.3,
330+
it uses the Bcrypt hasher. If PHP or Symfony adds new password hashers in the
331+
future, it might select a different hasher.
332+
333+
Because of this, the length of the hashed passwords may change in the future, so
334+
make sure to allocate enough space for them to be persisted (``varchar(255)``
335+
should be a good setting).
349336

350-
It produces hashed passwords with ``60`` characters long, so make sure to
337+
.. _reference-security-encoder-bcrypt:
338+
339+
Using the Bcrypt Password Hasher
340+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
341+
342+
It produces hashed passwords with the `bcrypt password hashing function`_.
343+
Hashed passwords are ``60`` characters long, so make sure to
351344
allocate enough space for them to be persisted. Also, passwords include the
352345
`cryptographic salt`_ inside them (it's generated automatically for each new
353346
password) so you don't have to deal with it.
@@ -368,6 +361,22 @@ used back when they were hashed.
368361
the cost to ``4``, which is the minimum value allowed, in the ``test``
369362
environment configuration.
370363

364+
.. _reference-security-sodium:
365+
.. _using-the-argon2i-password-encoder:
366+
.. _using-the-sodium-password-encoder:
367+
368+
Using the Sodium Password Hasher
369+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
370+
371+
It uses the `Argon2 key derivation function`_. Argon2 support was introduced
372+
in PHP 7.2 by bundeling the `libsodium`_ extension.
373+
374+
The hashed passwords are ``96`` characters long, but due to the hashing
375+
requirements saved in the resulting hash this may change in the future, so make
376+
sure to allocate enough space for them to be persisted. Also, passwords include
377+
the `cryptographic salt`_ inside them (it's generated automatically for each new
378+
password) so you don't have to deal with it.
379+
371380
.. _reference-security-pbkdf2:
372381
.. _using-the-pbkdf2-encoder:
373382

0 commit comments

Comments
 (0)