disabled sqli middleware

This commit is contained in:
Denis Duliçi
2021-07-18 17:12:37 +03:00
parent ca98e2c0c5
commit c2fd5c3eaa
6 changed files with 13 additions and 7 deletions

View File

@ -18,7 +18,13 @@ class Contact extends FormRequest
$logo = 'nullable';
$type = $this->request->get('type', 'customer');
$company_id = $this->request->get('company_id');
// @todo must put contact types under a specific array, see category
if (empty(config('type.' . $type))) {
$type = null;
}
$company_id = (int) $this->request->get('company_id');
// Check if store or update
if ($this->getMethod() == 'PATCH') {