UI fixes, code tightening, security fixes

This commit is contained in:
Andy Dixon
2026-03-17 10:19:21 +00:00
parent 40cc6b8c66
commit 42fe5b9304
9 changed files with 335 additions and 78 deletions
+8 -2
View File
@@ -37,10 +37,16 @@ class Logger
$entry = sprintf(
"[%s]\tUser: %s\t%s\n",
date('Y-m-d H:i:s'),
$user,
trim($message)
$this->normaliseLogField($user),
$this->normaliseLogField($message)
);
file_put_contents($logFile, $entry, FILE_APPEND);
}
private function normaliseLogField($value): string
{
$value = trim((string) $value);
return str_replace(["\r", "\n", "\t"], [' ', ' ', ' '], $value);
}
}