Closed ircmaxell closed 9 years ago
If I am correct, than hash_equals
is the solution for this. Since it is introduced in PHP 5.6, I created a backport package for it:
Adding a quick version of hash_equals to the Jwt class to backport the validation. Closing issue.
The current MAC verification code is vulnerable to timing attacks since it uses a direct comparison.
Instead, implement Double HMAC Verification
However, don't re-use any keys, generate a random key for use in the verification: source: