diff --git a/app/Http/Requests/Client/StoreClientRequest.php b/app/Http/Requests/Client/StoreClientRequest.php index 48e4d095c36d..0f77f3348ef2 100644 --- a/app/Http/Requests/Client/StoreClientRequest.php +++ b/app/Http/Requests/Client/StoreClientRequest.php @@ -158,6 +158,10 @@ class StoreClientRequest extends Request unset($input['number']); } + if (array_key_exists('name', $input)) { + $input['name'] = strip_tags($input['name']); + } + $this->replace($input); } diff --git a/app/Http/Requests/Client/UpdateClientRequest.php b/app/Http/Requests/Client/UpdateClientRequest.php index cf0da48a6926..c95f3592331f 100644 --- a/app/Http/Requests/Client/UpdateClientRequest.php +++ b/app/Http/Requests/Client/UpdateClientRequest.php @@ -112,6 +112,10 @@ class UpdateClientRequest extends Request $input['settings'] = $this->filterSaveableSettings($input['settings']); } + if (array_key_exists('name', $input)) { + $input['name'] = strip_tags($input['name']); + } + $this->replace($input); } diff --git a/app/Http/Requests/User/StoreUserRequest.php b/app/Http/Requests/User/StoreUserRequest.php index dfd752d1e09c..57d8baf4b465 100644 --- a/app/Http/Requests/User/StoreUserRequest.php +++ b/app/Http/Requests/User/StoreUserRequest.php @@ -85,6 +85,14 @@ class StoreUserRequest extends Request ]; } + if (array_key_exists('first_name', $input)) { + $input['first_name'] = strip_tags($input['first_name']); + } + + if (array_key_exists('last_name', $input)) { + $input['last_name'] = strip_tags($input['last_name']); + } + $this->replace($input); } diff --git a/app/Http/Requests/User/UpdateUserRequest.php b/app/Http/Requests/User/UpdateUserRequest.php index 42fa3f66e82e..2e2a95bb7f7b 100644 --- a/app/Http/Requests/User/UpdateUserRequest.php +++ b/app/Http/Requests/User/UpdateUserRequest.php @@ -49,6 +49,14 @@ class UpdateUserRequest extends Request $input['email'] = trim($input['email']); } + if (array_key_exists('first_name', $input)) { + $input['first_name'] = strip_tags($input['first_name']); + } + + if (array_key_exists('last_name', $input)) { + $input['last_name'] = strip_tags($input['last_name']); + } + $this->replace($input); } } diff --git a/app/Utils/Traits/GeneratesCounter.php b/app/Utils/Traits/GeneratesCounter.php index 30c8a58f7b33..5579207fc897 100644 --- a/app/Utils/Traits/GeneratesCounter.php +++ b/app/Utils/Traits/GeneratesCounter.php @@ -421,7 +421,6 @@ trait GeneratesCounter $check_counter = 1; do { - nlog($counter); $number = $this->padCounter($counter, $padding);