Install

Works with Drupal: ^10.3 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 56 KB
MD5: 042d411d33590d5af17d933b99a23e6a
SHA-1: 3231837d2013986afe89142332f8e37337f7f42d
SHA-256: 0acfc03008e868cdb21ebc4e7103b1fcfb14ccd0facf496bd51ab0dfbe7731fb
Download zip 88.24 KB
MD5: f882816a5c6ea2faddf36faf2ed5fb18
SHA-1: b294cd12eaf4cdaed2cc66a60ce42b8a9f37ffaf
SHA-256: 266aa33aaf670ab21bb538b412c803851d65b92454441eb701436c19ce792bc9

Release notes

Security and correctness on the login endpoint, answering the security advisory coverage review. No API changes, no configuration changes, no update hook.

Security

  • The per-user flood counter is keyed on the account id plus the client IP rather than on the name as typed, as core's UserAuthenticationController::getLoginFloodIdentifier() does. The identifier column of the flood table is ASCII, so a non-ASCII user name made isAllowed() throw on MySQL and MariaDB -- that account got a 500 even with the right password. The same column compares case-sensitively on PostgreSQL and SQLite, where user names do not, so two spellings of one name kept two separate counters.
  • The hash an unknown user is verified against follows the site's settings. It was a constant at bcrypt cost 10; PHP hashes at cost 12 from 8.4, and verifying against the constant returned in roughly a quarter of the time a real check took. That latency difference told a known name from an unknown one, which is what the constant was there to prevent. The hash is now produced by the site's password service, kept in state, and produced again whenever needsRehash() reports it outdated.
  • A successful login rehashes an outdated password, as core's UserAuthentication::authenticateAccount() does. A user who only ever signed in through /auth/token kept the hash their account was created with, through any later change of algorithm or cost.

Changed

  • The settings form carries its bounds as #min and #max on the number elements. The two token lifetimes had a ceiling and no floor, so a negative lifetime was saved; they are now 60 to 86400 seconds for the access token and 300 to 2592000 for the refresh token.
  • Hook implementations are class methods on JwtTokenRefreshHooks, with #[LegacyHook] procedural wrappers kept for Drupal 10.3 to 11.0, and the settings form maps onto configuration with #config_target.

Upgrading

Nothing to do. Stored configuration is not touched and no update hook runs. One thing to know: if you had set a token lifetime below the new floors, the value keeps working, but the settings form will ask you to raise it the next time you save it.

Verification

Drupal 11.4.5 on PHP 8.4.1: 62 tests and 338 assertions green, up from 58 and 306. PHPCS clean against Drupal and DrupalPractice, PHPStan at level 6 as a blocking gate. All thirteen jobs green on pipeline 959419, previous major and newest supported PHP included.

Created by: rym_oueslati
Created on: 13 Sep 2026 at 17:25 UTC
Last updated: 13 Sep 2026 at 17:25 UTC

Other releases