Temporary fix for CSRF logging

main
Yasen Pramatarov 2025-02-23 00:04:26 +02:00
parent 91aca75138
commit 019f31cc05
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@ function applyCsrfMiddleware() {
if (!$security->verifyCsrfToken($token)) {
// Log CSRF attempt
error_log("CSRF attempt detected from IP: " . $_SERVER['REMOTE_ADDR']);
$logObject->insertLog(0, "CSRF attempt detected from IP: " . $_SERVER['REMOTE_ADDR'], 'system');
//FIXME log class not loaded
// $logObject->insertLog(0, "CSRF attempt detected from IP: " . $_SERVER['REMOTE_ADDR'], 'system');
// Return error message
http_response_code(403);