Closed data219 closed 8 years ago
Hi @data219,
would you mind giving some more background to this PR? I'll close it for now, but please do not hesitate to add some comments so we can revisit it.
Thanks in advance! David
Hi @djoos,
this prevents remote timing attacks (https://en.wikipedia.org/wiki/Timing_attack) by using the symfony string utils (StringUtils::equals()
) to compare expected and actual digest (See line 137, Security/Core/Authentication/Provider/Provider.php
) . Symfony string utils implement a string comparison with fixed runtime.
Thanks for the additional info @data219, ok: I'm going to add this in shortly (I'll reference this thread)...
FYI: in the meantime StringUtils has been deprecated in favor of hash_equals (>= PHP 5.6). I'll fix the failed Travis tests in master now.
string utils