diff options
| author | Debulois <quentin@debulois.fr> | 2022-07-13 13:13:45 +0200 |
|---|---|---|
| committer | Debulois <quentin@debulois.fr> | 2022-07-15 14:24:02 +0200 |
| commit | be364bb579f60ce87f43bb8421f81dc6312be23e (patch) | |
| tree | 6d4e581a70840d1bacc2f7bfeb5ed1edce526de4 /Core/Functions/func_register.php | |
| parent | 105b825923ce03fc43eacb0575212fe52336ce34 (diff) | |
Résolution bug si char non présent dans cookie autologin
Optimisation de quelques éléments
Réorganisation légère des documents tiers
Ajout .htaccess pour interdire le listage des dossiers
Diffstat (limited to 'Core/Functions/func_register.php')
| -rw-r--r-- | Core/Functions/func_register.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Core/Functions/func_register.php b/Core/Functions/func_register.php index 4c6b00a..4d11dfa 100644 --- a/Core/Functions/func_register.php +++ b/Core/Functions/func_register.php @@ -11,12 +11,15 @@ function register($email, $password, $userStatus) { $regNumb = "/[0-9]/"; $regUpper = "/[A-Z]/"; $regSpecial = "/[`!@#$%^&*()_+\-=\[\]{};':\"\\|,.<>\/?~µ°€£]/"; - $regEmail = "/^[a-z0-9._-]+@[a-z0-9-]+\.[a-z]/"; + $regEmail = "/^[a-z0-9._-]+@[a-z0-9-]+\.[a-z]+$/"; if ((strlen($password) >= 8) + && (strlen($password) <= 128) && preg_match($regNumb, $password) && preg_match($regUpper, $password) && preg_match($regSpecial, $password) + && (strlen($email) > 0) + && (strlen($email) <= 128) && preg_match($regEmail, $email) ) { $dbuser = new DbUser; |
