mraible opened a new pull request, #321: URL: https://github.com/apache/roller/pull/321
When a user's password changes, by their own profile save or an administrator's edit, or the user is disabled, their other logged-in sessions now end on their next request to `/roller-ui`. The session that made the change stays logged in. - `RollerSession` keeps a SHA-256 digest of the user's stored password hash, set when the user is attached to the session. `getRollerSession` reloads the user (enabled users only), and if the user is gone or disabled or the digest no longer matches, it invalidates the HTTP session, clears Spring's `SecurityContext` and returns an empty `RollerSession`. A database error leaves the session alone. - `RollerSession.refreshPassword(request, user)` updates the acting session's digest; `Profile.save` calls it, and `UserEdit.save` calls it when administrators edit themselves. - `RollerLoginSessionManager.invalidate`, which `UserEdit` already called, only cleared a cache entry, so the next request rebuilt the session from the Spring login. - No Spring Security configuration changes. Remember-me cookies already stop working after a password change, since their signature includes the stored hash. Weblog page requests read the Spring login directly, so a preview in another browser keeps working until that browser next opens a `/roller-ui` page. Tests: `PasswordChangeSessionTest` covers a user's own change, an administrator's reset, disabling a user, administrators changing their own password, and an edit without a password change. Four of its five cases fail without the change. `mvn test` passes (754 tests), and the Playwright database-login suite passes (20 run, 3 OIDC tests skipped). CHANGES entries for this and the related fixes will come in one PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
