Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 893a780

Browse files
committed
[#3009] Updating information for 2.4 with the new checkPasswordLength method
1 parent cc70738 commit 893a780

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

components/security/authentication.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,8 @@ own, it just needs to follow these rules:
198198

199199
#. The class must implement :class:`Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface`;
200200

201-
#. The first line in ``encodePassword`` and ``isPasswordValid`` must check
202-
to make sure the password is not too long (e.g. 4096). This is for security
203-
(see `CVE-2013-5750`_), and you can copy the `BasePasswordEncoder::checkPasswordLength`_
204-
implementation from Symfony 2.4.
201+
#. ``$this->checkPasswordLength($raw);`` must be the first code executed in
202+
``encodePassword()`` and ``isPasswordValid()`` (see `CVE-2013-5750`_).
205203

206204
Using Password Encoders
207205
~~~~~~~~~~~~~~~~~~~~~~~
@@ -227,5 +225,4 @@ which should be used to encode this user's password::
227225
$password,
228226
$user->getSalt());
229227

230-
.. _`CVE-2013-5750`: http://symfony.com/blog/cve-2013-5750-security-issue-in-fosuserbundle-login-form
231-
.. _`BasePasswordEncoder::checkPasswordLength`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
228+
.. _`CVE-2013-5750`: http://symfony.com/blog/cve-2013-5750-security-issue-in-fosuserbundle-login-form

0 commit comments

Comments
 (0)