Skip to content

Commit 1b8cf6c

Browse files
committed
Merge branch '5.8.x' into 6.1.x
2 parents 38ae090 + e5ee45d commit 1b8cf6c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crypto/src/main/java/org/springframework/security/crypto/password/DelegatingPasswordEncoder.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import java.util.HashMap;
2020
import java.util.Map;
2121

22-
import org.springframework.util.StringUtils;
23-
2422
/**
2523
* A password encoder that delegates to another PasswordEncoder based upon a prefixed
2624
* identifier.
@@ -292,7 +290,7 @@ public String encode(CharSequence rawPassword) {
292290
@Override
293291
public boolean matches(CharSequence rawPassword, String prefixEncodedPassword) {
294292
String id = extractId(prefixEncodedPassword);
295-
if (StringUtils.hasText(id)) {
293+
if (id != null && !id.isEmpty()) {
296294
throw new IllegalArgumentException(String.format(NO_PASSWORD_ENCODER_MAPPED, id));
297295
}
298296
throw new IllegalArgumentException(NO_PASSWORD_ENCODER_PREFIX);

0 commit comments

Comments
 (0)