From fe61e4519cdb29edea6bbadab71368869eb320c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 23 Aug 2022 14:12:45 +0300 Subject: [PATCH 1/2] Update SECURITY.md --- SECURITY.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 90b8c0044..2a5c9c1d1 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -11,7 +11,8 @@ Feel free to report security issues based on the following chart. | 1.2.x | :x: | | 1.3.x | :x: | | 2.0.x | :x: | -| 2.1.x | :white_check_mark: | +| 2.1.x | :x: | +| 3.0.x | :white_check_mark: | ## Reporting a Vulnerability From e46df4ae2de23a64ed7d27c8e9917ab7f730b1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 23 Aug 2022 15:32:16 +0300 Subject: [PATCH 2/2] fixed portal profile update validation issue.. --- app/Http/Requests/Portal/Profile.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/Portal/Profile.php b/app/Http/Requests/Portal/Profile.php index 0cc532d87..d5c7d3964 100644 --- a/app/Http/Requests/Portal/Profile.php +++ b/app/Http/Requests/Portal/Profile.php @@ -34,11 +34,16 @@ class Profile extends FormRequest . ',deleted_at,NULL'; } + $change_password = $this->request->get('change_password') == true || $this->request->get('change_password') != null; + + $current_password = $change_password ? '|current_password' : ''; + $password = $change_password ? '|confirmed' : ''; + return [ 'name' => 'required|string', 'email' => $email, - 'current_password' => 'required_if:change_password,true|current_password', - 'password' => 'required_if:change_password,true|confirmed', + 'current_password' => 'required_if:change_password,true' . $current_password, + 'password' => 'required_if:change_password,true' . $password, 'picture' => $picture, ]; }