Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with null $alg in constructor of AESGCMKeyWrap #197

Merged
merged 2 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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