Repository navigation
Don't match the external-login placeholder as a password - #304
Merged
Merged
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.
snoopdave
reviewed
Nov 18, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
Review of cfb28cc49: The wrapper covers the password checks used by DAO login, AtomPub, and XML-RPC, and the login tests exercise the changed path. The twin’s different wrapper location is explained by the older branch’s encoder factory.
…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.
Contributor
Author
|
A second review raised a few more points, now addressed in the latest commits:
|
This was referenced Nov 18, 2026
…ember-me Registering without a password outside db mode no longer throws a NullPointerException when the passwords are compared. The remember-me signature for LDAP users now takes its placeholder from RollerPasswordEncoders.externalLoginMarker(), so an empty users.passwords.externalAuthValue means the default there as it does everywhere else. With the default configuration the value is unchanged, so existing remember-me cookies stay valid. Also removes the duplicate RollerPasswordEncoders imports, and makes the tests restore WebloggerConfig properties even when user teardown fails or the original value was not set.
snoopdave
reviewed
Nov 20, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
Review of 2e66914e5: The current fix covers the password checks and password-setting forms reviewed. The twin PR has the same behavior; its separate wrapper and startup change reflect the older branch’s encoder setup. Tests were reviewed but not run.
Earlier comments: 3 of 3 resolved.
No new issues found.
snoopdave
approved these changes
Nov 20, 2026
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.
Users who log in through LDAP or the servlet container have
users.passwords.externalAuthValue(by default<externalAuth>) stored in place of a Roller password.RollerPasswordEncodersnow wraps the encoder so thatmatches()never accepts that placeholder, the default<externalAuth>or an empty password, wherever Roller checks a password with it. Registration, the profile page and the admin user editor refuse the placeholder as a new password, and an empty setting falls back to<externalAuth>. Encoding andupgradeEncodingare unchanged, and stored passwords aren't touched.create()now returnsPasswordEncoderinstead ofDelegatingPasswordEncoder; its callers already use it as aPasswordEncoder, including #300'sSecurityConfig.ExternalLoginPlaceholderTestchecks a login throughDaoAuthenticationProviderandRollerUserDetailsServicefor a user whose stored password is the placeholder, encoded and unencoded, and the encoder directly. The login cases fail without the change.ExternalLoginMarkerPasswordTestchecks that the three forms refuse the placeholder.mvn testpasses.A further review pass added these fixes: