snoopdave commented on code in PR #333:
URL: https://github.com/apache/roller/pull/333#discussion_r4636771136
##########
app/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Register.java:
##########
@@ -388,8 +389,14 @@ public void myValidate() {
getBean().setPasswordConfirm(randomString);
}
+ // the external-login marker is stored for users who log in elsewhere
+ // and never matches at login
+ if (!usingSSO &&
ExternalLoginAwarePasswordEncoder.isExternalLoginMarker(getBean().getPasswordText()))
{
Review Comment:
**Important:** The twin validates the UTF-8 byte length of passwords in
`Register`, `Profile`, and `UserEdit`; this branch lacks those checks. The
existing 20-character form limit still permits input beyond bcrypt's 72-byte
bound. Add the byte-length validation and tests to all three forms.
##########
app/src/main/java/org/apache/roller/weblogger/ui/core/RollerSession.java:
##########
@@ -112,7 +139,13 @@ public static RollerSession
getRollerSession(HttpServletRequest request) {
}
// only set authenticated user if user is enabled
if (user != null && user.getEnabled()) {
+ // a login whose password changed since it was first
+ // seen ends here too, even with no Roller session left
+ if (!sameLoginPassword(session, user)) {
Review Comment:
**Important:** If an account is disabled before its login first opens a
Roller UI page, `findUser()` returns no enabled user, so this check is skipped
and the session is never ended. Check a recorded login when the user lookup
returns null or disabled, then end that session. Add a test for this sequence.
--
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]