Deploy: 2026-05-21 01:58:32
This commit is contained in:
@@ -33,7 +33,7 @@ class SecurityMiddleware
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively sanitize input arrays
|
||||
* Recursively trim input arrays
|
||||
*/
|
||||
private function sanitizeArray(array $data): array
|
||||
{
|
||||
@@ -42,8 +42,7 @@ class SecurityMiddleware
|
||||
if (is_array($value)) {
|
||||
$sanitized[$key] = $this->sanitizeArray($value);
|
||||
} elseif (is_string($value)) {
|
||||
// Strip HTML tags and convert special characters to HTML entities
|
||||
$sanitized[$key] = htmlspecialchars(strip_tags(trim($value)), ENT_QUOTES, 'UTF-8');
|
||||
$sanitized[$key] = trim($value);
|
||||
} else {
|
||||
$sanitized[$key] = $value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user