diff options
Diffstat (limited to 'src/controller')
-rw-r--r-- | src/controller/Captcha.php | 2 | ||||
-rw-r--r-- | src/controller/password.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/controller/Captcha.php b/src/controller/Captcha.php index 3253b95..da61a53 100644 --- a/src/controller/Captcha.php +++ b/src/controller/Captcha.php | |||
@@ -44,7 +44,7 @@ class Captcha | |||
44 | } | 44 | } |
45 | static public function controlInput(string $input = '0'): int | 45 | static public function controlInput(string $input = '0'): int |
46 | { | 46 | { |
47 | // un POST est une chaîne qu'on doit convertir en nombre si: | 47 | // un POST est une chaîne qu'on doit convertir en nombre dans deux conditions: |
48 | // test de format: $input est un nombre | 48 | // test de format: $input est un nombre |
49 | // test d'intégrité: supprimer les décimales avec (int) ne change pas la valeur du nombre | 49 | // test d'intégrité: supprimer les décimales avec (int) ne change pas la valeur du nombre |
50 | return is_numeric($input) && $input == (int)$input ? (int)$input : 0; | 50 | return is_numeric($input) && $input == (int)$input ? (int)$input : 0; |
diff --git a/src/controller/password.php b/src/controller/password.php index 2a38508..2189326 100644 --- a/src/controller/password.php +++ b/src/controller/password.php | |||
@@ -154,7 +154,7 @@ function connect(LoginBuilder $builder, EntityManager $entityManager) | |||
154 | elseif(!isset($_POST['login']) || empty($_POST['login']) | 154 | elseif(!isset($_POST['login']) || empty($_POST['login']) |
155 | || !isset($_POST['password']) || empty($_POST['password'])) | 155 | || !isset($_POST['password']) || empty($_POST['password'])) |
156 | { | 156 | { |
157 | $error = 'bad_password'; | 157 | $error = 'bad_login_or_password'; |
158 | } | 158 | } |
159 | else // c'est OK | 159 | else // c'est OK |
160 | { | 160 | { |
@@ -179,7 +179,7 @@ function connect(LoginBuilder $builder, EntityManager $entityManager) | |||
179 | } | 179 | } |
180 | else | 180 | else |
181 | { | 181 | { |
182 | $error = 'bad_password'; | 182 | $error = 'bad_login_or_password'; |
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||