From 67d67a287f8c49c1df84cda27559f66390de12a4 Mon Sep 17 00:00:00 2001 From: Daniel Reichelt Date: Sat, 20 Feb 2021 21:57:22 +0100 Subject: [PATCH] system: validatePassword(): also quote the delimiter ('/') Quoting the default regex delimiter is required for the password complexity check to work if '/' had been specified as special character in Froxlor's account settings. --- lib/Froxlor/System/Crypt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Froxlor/System/Crypt.php b/lib/Froxlor/System/Crypt.php index 873d7cec..7f2a9e17 100644 --- a/lib/Froxlor/System/Crypt.php +++ b/lib/Froxlor/System/Crypt.php @@ -168,7 +168,7 @@ class Crypt $password = \Froxlor\Validate\Validate::validate($password, '/.*[0-9]+.*/', '/.*[0-9]+.*/', 'notrequiredpasswordcomplexity', array(), $json_response); } if (Settings::Get('panel.password_special_char_required')) { - $password = \Froxlor\Validate\Validate::validate($password, '/.*[' . preg_quote(Settings::Get('panel.password_special_char')) . ']+.*/', '/.*[' . preg_quote(Settings::Get('panel.password_special_char')) . ']+.*/', 'notrequiredpasswordcomplexity', array(), $json_response); + $password = \Froxlor\Validate\Validate::validate($password, '/.*[' . preg_quote(Settings::Get('panel.password_special_char'), '/') . ']+.*/', '/.*[' . preg_quote(Settings::Get('panel.password_special_char'), '/') . ']+.*/', 'notrequiredpasswordcomplexity', array(), $json_response); } }