Skip to content

Commit

Permalink
Merge pull request #197 from kelvinmo/issues/aescgmkeywrap-null
Browse files Browse the repository at this point in the history
Fix issue with null $alg in constructor of AESGCMKeyWrap
  • Loading branch information
kelvinmo authored Jul 6, 2024
2 parents 5460000 + f8d7263 commit d1c49be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleJWT/Crypt/KeyManagement/AESGCMKeyWrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit d1c49be

Please sign in to comment.