1
0
mirror of synced 2026-09-12 12:15:13 +00:00
Files
spring-security/crypto
seonwoo_jung 7cc20776c1 Avoid spring-core in password encoder validation
`spring-core` is an `optional` dependency of `spring-security-crypto`,
so it is not published in the POM and is not guaranteed to be on the
classpath when the module is used standalone.

7.1.0 refactored `AbstractValidatingPasswordEncoder` to use
`org.springframework.util.StringUtils#hasLength`, which causes
`NoClassDefFoundError` on `BCryptPasswordEncoder#matches` (and other
encoders extending it) for standalone users.

Restore the inline null/empty checks the encoder used prior to that
refactor so that the runtime hot path no longer reaches into
`spring-core`.

Closes gh-19317

Signed-off-by: seonwoo_jung <laborlawseon@kap.kr>
2026-09-10 16:01:40 -06:00
..