Commit 438ac593 authored by Ben Hayward's avatar Ben Hayward

changes to meet feedback

1 merge request!232[Sprint/HiperHedgehog](bug): Fixed forgot password validation
Pipeline #73167173 passed with stages
in 6 minutes and 57 seconds
......@@ -94,7 +94,12 @@ class forgotpassword implements Interfaces\Api, Interfaces\ApiIgnorePam
break;
}
if (!preg_match('/[A-Z]/', $password) || !preg_match('/\d/', $password) || !preg_match('/[^a-zA-Z\d]/', $password) || preg_match("/\\s/", $password)) {
try {
if (!validate_password($_POST['password'])) {
$response['status'] = "error";
$response['message'] = "Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces.";
}
} catch (\Exception $e) {
$response['status'] = "error";
$response['message'] = "Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces.";
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment