Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
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. Theidentifiercolumn of the flood table is ASCII, so a non-ASCII user name madeisAllowed()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/tokenkept the hash their account was created with, through any later change of algorithm or cost.
Changed
- The settings form carries its bounds as
#minand#maxon 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.