You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: web/add/db/index.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -42,8 +42,7 @@
42
42
43
43
// Check password length
44
44
if (empty($_SESSION['error_msg'])) {
45
-
$pw_len = strlen($_POST['v_password']);
46
-
if ($pw_len < 6 ) $_SESSION['error_msg'] = __('Password is too short.',$error_msg);
45
+
if (!preg_match('/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/', $_POST['v_password'])) { $_SESSION['error_msg'] = __('Password does not match the minimum requirements'); }
Copy file name to clipboardExpand all lines: web/add/mail/index.php
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,8 @@
96
96
header('location: /login/');
97
97
exit();
98
98
}
99
+
100
+
99
101
100
102
// Check empty fields
101
103
if (empty($_POST['v_domain'])) $errors[] = __('domain');
@@ -118,6 +120,11 @@
118
120
$_SESSION['error_msg'] = __('Please enter valid email address.');
119
121
}
120
122
}
123
+
124
+
// Check password length
125
+
if (empty($_SESSION['error_msg']) && !empty($_POST['v_fwd_only']) ) {
126
+
if (!preg_match('/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/', $_POST['v_password'])) { $_SESSION['error_msg'] = __('Password does not match the minimum requirements'); }
0 commit comments