mraible commented on code in PR #301:
URL: https://github.com/apache/roller/pull/301#discussion_r4593511690


##########
app/src/main/java/org/apache/roller/weblogger/ui/core/security/RollerUserDetailsService.java:
##########
@@ -85,6 +86,38 @@ public UserDetails loadUserByUsername(String userName) {
 
     }
         
+    /**
+     * Stores a password that Spring Security re-encoded after a successful
+     * login, so passwords stored with an older encoding (for example the one
+     * named by passwds.encryption.lazyUpgradeFrom) move to
+     * passwds.encryption.algorithm. Nothing is stored when
+     * passwds.encryption.enabled is false, because the re-encoding would then
+     * be plain text.
+     */
+    @Override
+    public UserDetails updatePassword(UserDetails user, String newPassword) {
+        if (!WebloggerConfig.getBooleanProperty("passwds.encryption.enabled")) 
{

Review Comment:
   Good catch, thanks. Fixed in f69e6f921: `updatePassword` now skips any 
re-encoded password that is `null` or starts with `{noop}`, as you suggested, 
which covers both encryption off and `algorithm=noop`. `PasswordUpgradeTest` 
has a new case for `algorithm=noop`; it fails with the previous guard. CHANGES 
describes both settings. `mvn install` passes (735 tests).



-- 
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]

Reply via email to