Fix codeVerifier hash verification.

This commit is contained in:
Erick Torres 2017-06-16 12:02:34 -05:00 committed by Erick Torres
parent bf7084a147
commit 2482630221

View File

@ -144,7 +144,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
case 'S256':
if (
hash_equals(
urlencode(base64_encode(hash('sha256', $codeVerifier))),
rtrim(strtr(base64_encode(hash('sha256', $codeVerifier, true)), '+/', '-_'), '='),
$authCodePayload->code_challenge
) === false
) {