This commit is contained in:
looly 2021-12-20 09:34:14 +08:00
parent 8af31805a3
commit 2b4f70f88d
3 changed files with 9 additions and 2 deletions

View File

@ -3,7 +3,7 @@
-------------------------------------------------------------------------------------------------------------
# 5.7.18 (2021-12-17)
# 5.7.18 (2021-12-20)
### 🐣新特性
* 【core 】 新增CollStreamUtil.groupKeyValuepr#479@Gitee
@ -18,6 +18,7 @@
* 【core 】 修复CharSequenceUtil.replace问题issue#I4M16G@Gitee
* 【json 】 修复JSONObject 初始化大小值未被使用问题issue#2016@Github
* 【core 】 修复StrUtil.startWith都为null返回错误问题issue#I4MV7Q@Gitee
* 【core 】 修复PasswdStrength检测问题issue#I4N48X@Gitee
-------------------------------------------------------------------------------------------------------------
# 5.7.17 (2021-12-09)

View File

@ -159,7 +159,7 @@ public class PasswdStrength {
}
}
if (StrUtil.isNumeric(passwd) && len >= 6) { // 19881010 or 881010
if (StrUtil.isNumeric(passwd) && len >= 6 && len <= 8) { // 19881010 or 881010
int year = 0;
if (len == 8 || len == 6) {
year = Integer.parseInt(passwd.substring(0, len - 4));

View File

@ -9,4 +9,10 @@ public class PasswdStrengthTest {
String passwd = "2hAj5#mne-ix.86H";
Assert.assertEquals(13, PasswdStrength.check(passwd));
}
@Test
public void strengthNumberTest(){
String passwd = "9999999999999";
Assert.assertEquals(0, PasswdStrength.check(passwd));
}
}