mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix Bcrypt bug
This commit is contained in:
parent
cef68b6bde
commit
405208a5de
@ -14,6 +14,7 @@
|
||||
* 【core 】 修复Tailer无stop问题(issue#I3PQLQ@Gitee)
|
||||
* 【core 】 修复空白excel读取报错问题(issue#1552@Github)
|
||||
* 【extra 】 修复Sftp.mkDirs报错问题(issue#1536@Github)
|
||||
* 【core 】 修复Bcrypt不支持$2y$盐前缀问题(pr#1560@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user