From 4253acad4c9bdabdbc42ea3ea46885fde8ebf706 Mon Sep 17 00:00:00 2001 From: snipe Date: Sun, 18 Aug 2024 04:51:36 +0100 Subject: [PATCH] Prevent passing an array as login Signed-off-by: snipe --- app/Http/Controllers/Auth/LoginController.php | 4 ++-- resources/views/auth/login.blade.php | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 9ac976b43ce8..e7b10877cfd1 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -508,8 +508,8 @@ public function logout(Request $request) protected function validator(array $data) { return Validator::make($data, [ - 'username' => 'required', - 'password' => 'required', + 'username' => 'required|not_array', + 'password' => 'required|not_array', ]); } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 16c67ff2b930..298d55f4ec97 100755 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -57,16 +57,22 @@
- + {!! $errors->first('username', '') !!}
- + {!! $errors->first('password', '') !!}
-
+