system-phone 3.1.45 → 3.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const REG_STRONG_PWD =
|
|
2
|
+
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*(),.?":{}|<>~`+=_\\-])[A-Za-z\d!@#$%^&*(),.?":{}|<>~`+=_\\-]{8,}$/;
|
|
3
|
+
|
|
1
4
|
// 常见密码列表(可以根据需要扩展)
|
|
2
5
|
const COMMON_PASSWORDS = [
|
|
3
6
|
"password",
|
|
@@ -127,17 +130,10 @@ export const validateStrongPasswordPhone = (password) => {
|
|
|
127
130
|
return result;
|
|
128
131
|
}
|
|
129
132
|
|
|
130
|
-
const { config: WEB_COMMON_PASSWORDS } = useConfig(
|
|
131
|
-
"COMMON_PASSWORDS",
|
|
132
|
-
COMMON_PASSWORDS,
|
|
133
|
-
true,
|
|
134
|
-
"value"
|
|
135
|
-
);
|
|
136
|
-
|
|
137
133
|
// 2. 检查是否为常见密码
|
|
138
134
|
if (
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
COMMON_PASSWORDS.includes(password) ||
|
|
136
|
+
COMMON_PASSWORDS.includes(password.toLowerCase())
|
|
141
137
|
) {
|
|
142
138
|
result.isValid = false;
|
|
143
139
|
result.errors.push("不能使用常见密码");
|