From 3ba4baa2b3075ee5213efcda8cc3c029d1426283 Mon Sep 17 00:00:00 2001 From: Kelvin Mo Date: Sat, 6 Jul 2024 12:40:05 +1000 Subject: [PATCH 1/2] Fix issue with null $alg in constructor --- src/SimpleJWT/Crypt/KeyManagement/AESGCMKeyWrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SimpleJWT/Crypt/KeyManagement/AESGCMKeyWrap.php b/src/SimpleJWT/Crypt/KeyManagement/AESGCMKeyWrap.php index 6de8d26..f5fa7d8 100644 --- a/src/SimpleJWT/Crypt/KeyManagement/AESGCMKeyWrap.php +++ b/src/SimpleJWT/Crypt/KeyManagement/AESGCMKeyWrap.php @@ -52,7 +52,7 @@ class AESGCMKeyWrap extends BaseAlgorithm implements KeyEncryptionAlgorithm { private $aesgcm; public function __construct(?string $alg) { - $this->aesgcm = new AESGCM(substr($alg, 0, -2)); + $this->aesgcm = new AESGCM(($alg == null) ? null : substr($alg, 0, -2)); parent::__construct($alg); } From f8d726362f6d2f5602c74a1ab070435acd7b497d Mon Sep 17 00:00:00 2001 From: Kelvin Mo Date: Sat, 6 Jul 2024 12:45:53 +1000 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ccfd67..f5876ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## [Unreleased] + +- Fixed: Deprecation warning in constructor of AESGCMKeyWrap (#197) + ## [0.9.0] - Changed: Providing invalid JSON tokens into JWT::deserialise() and @@ -206,6 +210,7 @@ All notable changes to this project will be documented in this file. - Initial release +[Unreleased]: https://github.com/kelvinmo/simplejwt/compare/v0.9.0...HEAD [0.9.0]: https://github.com/kelvinmo/simpleid/compare/v0.8.2...v0.9.0 [0.8.2]: https://github.com/kelvinmo/simpleid/compare/v0.8.1...v0.8.2 [0.8.1]: https://github.com/kelvinmo/simpleid/compare/v0.8.0...v0.8.1