mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix Bcrypt bug
This commit is contained in:
@@ -424,7 +424,9 @@ public class BCrypt {
|
||||
off = 3;
|
||||
else {
|
||||
minor = salt.charAt(2);
|
||||
if (minor != 'a' || salt.charAt(3) != '$')
|
||||
// pr#1560@Github
|
||||
// 修正一个在Blowfish实现上的安全风险
|
||||
if ((minor != 'a' && minor != 'x' && minor != 'y' && minor != 'b') || salt.charAt(3) != '$')
|
||||
throw new IllegalArgumentException("Invalid salt revision");
|
||||
off = 4;
|
||||
}
|
||||
|
Reference in New Issue
Block a user