Repository navigation
Conversation
Users who log in through LDAP or the servlet container have users.passwords.externalAuthValue stored in place of a Roller password. Roller's password encoder no longer matches that placeholder, so it isn't treated as a password anywhere the encoder checks one.
…unt is disabled RollerSession now keeps a SHA-256 digest of the user's stored password hash from when the session logged in. On each lookup it reloads the user and, if the user is gone, disabled, or has a different password hash, it invalidates the HTTP session, clears the Spring SecurityContext for the request, and continues with an empty session, so the browser has to log in again. The check runs before the session-cache check, which would otherwise rebuild the session from the existing login. It applies to form, remember-me and OpenID logins alike, since the session tracks the Roller user name rather than the principal. Profile.save and UserEdit.save (when an administrator edits their own account) refresh the digest of the session that made the change, so that session stays logged in. Both actions now receive the servlet request through ServletRequestAware, as Register already does. (cherry picked from commit 32d476c)
snoopdave
reviewed
Nov 18, 2026
…thout a sign-in change Profile.save and UserEdit.save generated a new random stored password for OpenID accounts on every save, so with the session check a profile-only edit ended the user's other sessions. They now generate one only when the account has no stored password or its OpenID URL changes. PasswordChangeSessionTest covers a profile edit and an administrator edit of an OpenID account with another session open, and switching an account to OpenID.
…match an empty one Registration, the profile page and the admin user editor now reject users.passwords.externalAuthValue, and the default <externalAuth>, as a new password with a validation message, since that value never matches at login. An account that already has it can be given a new password by an administrator. An empty configured value now falls back to <externalAuth> for what Roller stores, and the password encoder never matches an empty password or the default placeholder.
…s dropped When the container passivates a session, RollerSession removes itself from it, and the next request rebuilt it from the login with the user's current password, so the session survived a password change. The session now keeps the login's user name and password digest in a separate attribute that outlives the Roller session, and a rebuild for that user ends the session when the password differs. PasswordChangeSessionTest covers a passivated session after a password change and one without a change.
…n-placeholder-6.1.x
…password-change-6.1.x # Conflicts: # app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/UserEdit.java # app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Profile.java
Contributor
Author
|
A second review raised a few more points, now addressed in the latest commits:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 6.1.x version of #321, including its later changes (passivated sessions, OpenID profile saves). Stacked on #306, so merge #306 first; until then this PR's diff includes its commits. Profile and UserEdit implement ServletRequestAware here, as Register does, and the session tracks the Roller user name, so OpenID logins are covered.
PasswordChangeSessionTest (including OpenID and passivated sessions): five of the original six cases fail without the change. mvn test passes, and the Selenium integration tests pass.
CHANGES entries for the 6.1.8 fixes will come in one PR.