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.
This commit is contained in:
Rodrigo Pedra Brum 2021-03-01 10:38:37 -03:00 committed by GitHub
parent 16f531e646
commit 03be0afb44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ class TrimStrings extends Middleware
* @var array
*/
protected $except = [
'current_password',
'password',
'password_confirmation',
];