PHP-038 / Advanced
Comparing tokens or hashes using === (timing attacks)
Why is this a problem?
Response time varies with mismatch position, allowing tokens to be guessed one character at a time.
How to fix it
php
if (hash_equals($session->csrf_token, (string) $request->token)) { ... }