Polish userNotFoundEncodedPassword

Ensure that if passwordEncoder is set that userNotFoundEncodedPassword
is encoded again if already set.

Issue: gh-4915
This commit is contained in:
Rob Winch
2018-01-24 10:42:09 -06:00
parent fd78d055aa
commit 6ba225b62d
2 changed files with 31 additions and 0 deletions

View File

@@ -149,6 +149,7 @@ public class DaoAuthenticationProvider extends AbstractUserDetailsAuthentication
public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
Assert.notNull(passwordEncoder, "passwordEncoder cannot be null");
this.passwordEncoder = passwordEncoder;
this.userNotFoundEncodedPassword = null;
}
protected PasswordEncoder getPasswordEncoder() {