MDL-76415 lib: Fixed ${var} str interpolation deprecations in php-jwt.
Since PHP 8.2, placing the dollar sign outside the curly brace is deprecated when the expression inside the braces resolves to a variable or an expression.
This commit is contained in:
@@ -13,3 +13,9 @@ Instructions
|
||||
4. Download the latest release.
|
||||
5. Unzip it in lib as php-jwt.
|
||||
6. Update entry for this library in lib/thirdpartylibs.xml.
|
||||
|
||||
2023/01/26
|
||||
----------
|
||||
- src/JWT.php file has minor changes for PHP 8.2 compatibility. See MDL-76415 for more details.
|
||||
Since version v6.3.1, the php-jwt already has the fix, so if someone executing the upgrading version and
|
||||
it has the patch, please ignore this note.
|
||||
|
||||
@@ -136,7 +136,7 @@ class JWT
|
||||
// OpenSSL expects an ASN.1 DER sequence for ES256/ES384 signatures
|
||||
$sig = self::signatureToDER($sig);
|
||||
}
|
||||
if (!self::verify("${headb64}.${bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) {
|
||||
if (!self::verify("{$headb64}.{$bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) { // TODO: Remove this modification in MDL-76415.
|
||||
throw new SignatureInvalidException('Signature verification failed');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user