Problem/Motivation

The module currently requires firebase/php-jwt ^6.10, which is outdated. Version 6 is no longer receiving security updates, and composer audit flags it as a dependency that should be upgraded. Version 7 of firebase/php-jwt introduces key size validation and other security hardening improvements.

Steps to reproduce

Install the module and run composer audit
Observe that firebase/php-jwt v6 is flagged

Proposed resolution

Update the firebase/php-jwt constraint in composer.json from ^6.10 to ^7.0.

The module's existing code in NotificationsTokenService is already fully compatible with v7:

JWT::decode() already uses the new Key($secret, 'HS256') pattern introduced as required in v7
JWT::encode() signature is unchanged between v6 and v7
The module uses HS256, which is not affected by the new minimum key size enforcement (which only applies to RSA/EC keys)
The module already requires Drupal 10/11, meaning PHP 8.0+ is guaranteed, satisfying the new v7 PHP requirement
No code changes are needed — only the composer constraint needs to be loosened.

Remaining tasks

Update composer.json constraint from ^6.10 to ^7.0
Verify tests pass against firebase/php-jwt v7

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#3 3588028-3.patch661 bytesmartijn de wit
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

martijn de wit created an issue. See original summary.

martijn de wit’s picture

Assigned: martijn de wit » Unassigned
Status: Active » Needs review
StatusFileSize
new661 bytes

Also a patch.

martijn de wit changed the visibility of the branch 3588028-update-firebasephp-jwt-dependency to hidden.

https://git.drupalcode.org/project/de_notifications/-/merge_requests/17 is a more complete merge request but had no D.org issue.

sbrandt’s picture

Thank so much for picking this up! There's already an open MR regarding this issue which currently awaits review from a (co)-maintainer:

https://git.drupalcode.org/project/de_notifications/-/merge_requests/17

With the update of the firebase dependency, it is now required to use a longer secret, so having a too short secret might break functionality on affected sites. Therefore, we might need to release the fix as a new major release.

sbrandt’s picture

Version: 1.x-dev » 2.0.0
Status: Needs review » Fixed

This issue has been fixed in the new major release version 2.0.0.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sbrandt’s picture

Status: Fixed » Closed (fixed)