Skip to content

Commit d95130c

Browse files
committed
Remove a security note about deprecated StringUtils equals
1 parent f42bd71 commit d95130c

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

components/security/secure_tools.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,6 @@ The Symfony Security component comes with a collection of nice utilities
55
related to security. These utilities are used by Symfony, but you should
66
also use them if you want to solve the problem they address.
77

8-
Comparing Strings
9-
~~~~~~~~~~~~~~~~~
10-
11-
The time it takes to compare two strings depends on their differences. This
12-
can be used by an attacker when the two strings represent a password for
13-
instance; it is known as a `Timing attack`_.
14-
15-
Internally, when comparing two passwords, Symfony uses a constant-time
16-
algorithm; you can use the same strategy in your own code thanks to the
17-
:class:`Symfony\\Component\\Security\\Core\\Util\\StringUtils` class::
18-
19-
use Symfony\Component\Security\Core\Util\StringUtils;
20-
21-
// is some known string (e.g. password) equal to some user input?
22-
$bool = StringUtils::equals($knownString, $userInput);
23-
248
Generating a Secure random Number
259
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2610

0 commit comments

Comments
 (0)