From a200ccfdeb65a9224f6de05e95f045a9253f5121 Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Tue, 23 Apr 2019 18:16:33 +0200 Subject: [PATCH] Ensure a password can't contain a "/" --- evolibs/Form.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/evolibs/Form.php b/evolibs/Form.php index f1cdba9..772c572 100644 --- a/evolibs/Form.php +++ b/evolibs/Form.php @@ -720,6 +720,11 @@ class PasswordInputFormField extends FormField { return FALSE; } + if(!preg_match('#.*[/]+.*#',$this->value)==0){ + if($set_error) $this->error = 'Votre mot de passe doit contenir le caractère \'/\''; + return FALSE; + } + return TRUE; }