Deploy: 2026-05-21 01:58:32

This commit is contained in:
Hamza-Ayed
2026-05-21 01:58:32 +03:00
parent 16d494b4e1
commit aae860486a
11 changed files with 263 additions and 38 deletions

View File

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