Skip to content

Commit

Permalink
Merge branch '5.8.x' into 6.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jzheaux committed Apr 26, 2024
2 parents 38ae090 + e5ee45d commit 1b8cf6c
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -19,8 +19,6 @@
import java.util.HashMap;
import java.util.Map;

import org.springframework.util.StringUtils;

/**
* A password encoder that delegates to another PasswordEncoder based upon a prefixed
* identifier.
Expand Down Expand Up @@ -292,7 +290,7 @@ public String encode(CharSequence rawPassword) {
@Override
public boolean matches(CharSequence rawPassword, String prefixEncodedPassword) {
String id = extractId(prefixEncodedPassword);
if (StringUtils.hasText(id)) {
if (id != null && !id.isEmpty()) {
throw new IllegalArgumentException(String.format(NO_PASSWORD_ENCODER_MAPPED, id));
}
throw new IllegalArgumentException(NO_PASSWORD_ENCODER_PREFIX);
Expand Down

0 comments on commit 1b8cf6c

Please sign in to comment.