strip tags from client and user nameS

This commit is contained in:
David Bomba 2022-10-02 17:24:16 +11:00
parent 9f1fc5cec5
commit 32ee09ae1f
5 changed files with 24 additions and 1 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -421,7 +421,6 @@ trait GeneratesCounter
$check_counter = 1;
do {
nlog($counter);
$number = $this->padCounter($counter, $padding);