Bcrypt only support $2a previously

This commit is contained in:
Xephi59 2015-08-01 03:03:54 +02:00
parent 30564fad6e
commit 0c20101947

View File

@ -395,7 +395,7 @@ public class BCRYPT implements EncryptionMethod {
off = 3;
else {
minor = salt.charAt(2);
if (minor != 'a' || salt.charAt(3) != '$')
if (minor < 'a' || minor > 'z' || salt.charAt(3) != '$')
throw new IllegalArgumentException("Invalid salt revision");
off = 4;
}