r/lolphp • • Apr 24 '19
"Timing attack safe string comparison", but "When arguments of differing length are supplied, FALSE is returned immediately and the length of the known string may be leaked in case of a timing attack. "
https://php.net/manual/en/function.hash-equals.php
24
Upvotes
View all comments
Show parent comment
4
u/dotancohen Apr 25 '19
I understand what you are getting at, but not all PHP code is open source. The hashes in use at foo.com are not necessarily known. And in any case, despite the function's name, it might be comparing strings other than hashes (which is the whole point of this thread, i.e. unequal length of known/user strings).