mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
Merge pull request #8895 from ioito/hotfix/qx-password-check
fix(region): 避免OneCloud密码校验通过,公有云厂商密码校验不通过
This commit is contained in:
@@ -101,7 +101,7 @@ func AnalyzePasswordStrenth(passwd string) PasswordStrength {
|
||||
ps.Lowercases += 1
|
||||
} else if strings.IndexByte(ALL_UPPERS, passwd[i]) >= 0 {
|
||||
ps.Uppercases += 1
|
||||
} else if strings.IndexByte(ALL_PUNC, passwd[i]) >= 0 {
|
||||
} else if strings.IndexByte(PUNC, passwd[i]) >= 0 {
|
||||
ps.Punctuats += 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ func TestMeetComplxity(t *testing.T) {
|
||||
want bool
|
||||
}{
|
||||
{"123456", false},
|
||||
{"123abcABC!@#", true},
|
||||
{"123abcABC!@#", false},
|
||||
{"123abcABC-@=", true},
|
||||
}
|
||||
for _, c := range cases {
|
||||
if c.want != MeetComplxity(c.in) {
|
||||
|
||||
Reference in New Issue
Block a user