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.
snoopdave
reviewed
Nov 18, 2026
…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.
…n-placeholder-6.1.x
Contributor
Author
|
A second review raised a few more points, now addressed in the latest commits:
|
snoopdave
reviewed
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 ExternalLoginAwarePasswordEncoder.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. The tests now restore WebloggerConfig properties even when user teardown fails or the original value was not set, and put back the password encoder that RollerContext shares.
snoopdave
reviewed
Nov 20, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
Review of d984431e6: The current 6.1.x diff covers the earlier review points, including production encoder wiring and a provider-level test. The twin has the corresponding fix; its encoder location and test structure differ with the branch. One configuration-change case remains.
Earlier comments: 4 of 4 resolved.
Accounts created before users.passwords.externalAuthValue changed still have the old marker stored, encoded or not, and the encoder only recognized the current marker and the default, so the old marker matched at login. The new users.passwords.externalAuthValue.previous setting lists earlier markers, which are refused at login and can't be chosen as passwords, the same as the current one. Empty entries are ignored so an empty password never counts as a marker.
This was referenced Nov 20, 2026
…n-placeholder-6.1.x
…rker BCrypt gives some passwords other than a marker the same hash as the marker, so an exact comparison with the marker isn't enough to keep it from matching. After the delegate matches, the encoder now also checks whether the current, default or a previous marker matches the stored value, and refuses the password if one does. The marker list is read once per check.
DelegatingPasswordEncoder throws for a stored value without an encoder prefix when no lazy-upgrade encoder is configured, and for a null value, so such an account ended the login with an exception instead of bad credentials. The encoder now answers false for them.
An account whose real password equals the current, default or a previous marker can't log in, and until now the log didn't say why. The encoder now logs an info line for that refusal, without the password, so an administrator can tell it from a wrong password and set a new one.
The list is comma-separated, so a marker that contains a comma can't be listed there. roller.properties now says so, along with the accounts that need an administrator to set a new password. Roller also logs a warning at startup when the configured marker contains a comma.
…coder ExternalLoginMarkerPasswordTest now checks that registration, the profile page and user administration refuse a marker listed in users.passwords.externalAuthValue.previous, and its tearDown restores the configuration in a finally block. The provider tests for previous markers also check the encoder directly, and the list test covers spaces around an entry.
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 #304.
Users who log in through LDAP or the servlet container have
users.passwords.externalAuthValue(by default<externalAuth>) stored in place of a Roller password.RollerContextnow wraps its password encoder in a newExternalLoginAwarePasswordEncoder, whosematches()never accepts that placeholder, the default<externalAuth>or an empty password, wherever Roller checks a password with the encoder. Encoding andupgradeEncodingare unchanged, and stored passwords aren't touched.users.passwords.externalAuthValuefalls back to<externalAuth>.users.passwords.externalAuthValuecan be listed in the new comma-separatedusers.passwords.externalAuthValue.previoussetting, so accounts that still store an old marker can't log in with it. Recognize previously configured external-login markers #364 makes the same change on master, since Don't match the external-login placeholder as a password #304 had already merged.DelegatingPasswordEncoder, which throws for it.This line builds for Java 11, so the wrapper is a class rather than the record #304 uses, and
RollerContext.encoderis now typed asPasswordEncoder.ExternalLoginAwarePasswordEncoderTest,ExternalLoginPlaceholderTestandExternalLoginMarkerPasswordTestcover the placeholder encoded and unencoded, the default under another configured value, previous markers in the list and in the three password forms, a password that BCrypt treats as equal to a marker, an empty or missing stored password, and ordinary passwords that still work.