Turn off xss detection on unset fields

This commit is contained in:
Matias Griese
2020-11-17 19:10:13 +02:00
parent ea00c044d3
commit 78dc70bcdc

View File

@@ -104,7 +104,8 @@ class Validation
{
$messages = [];
if (!($field['check_xss'] ?? true)) {
$type = $field['validate']['type'] ?? $field['type'] ?? 'text';
if ($type === 'unset' || !($field['check_xss'] ?? true)) {
return $messages;
}
$name = ucfirst($field['label'] ?? $field['name'] ?? 'UNKNOWN');