From 03be0afb442b96ebfb0091cc9c3a44a7ad907f4b Mon Sep 17 00:00:00 2001 From: Rodrigo Pedra Brum Date: Mon, 1 Mar 2021 10:38:37 -0300 Subject: [PATCH] Don't trim `current_password` (#5546) Inspired by https://github.com/laravel/framework/pull/36415 As JetStream/Fortify uses a `current_password` field when allowing a user to change their password, and as JetStream is one of the starter kits listed on the docs, this PR adds `current_password` in the `$except` option of the `TrimStrings` middleware. --- app/Http/Middleware/TrimStrings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index 5a50e7b5..a8a252df 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -12,6 +12,7 @@ class TrimStrings extends Middleware * @var array */ protected $except = [ + 'current_password', 'password', 'password_confirmation', ];