|
@@ -27,6 +27,14 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|
|
*/
|
|
|
public class BCryptPasswordEncoderTests {
|
|
|
|
|
|
+ @Test
|
|
|
+ // gh-5548
|
|
|
+ public void emptyRawPasswordDoesNotMatchPassword() {
|
|
|
+ BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
|
|
|
+ String result = encoder.encode("password");
|
|
|
+ assertThat(encoder.matches("", result)).isFalse();
|
|
|
+ }
|
|
|
+
|
|
|
@Test
|
|
|
public void $2yMatches() {
|
|
|
// $2y is default version
|