feat: IP ban support (#185) (#188)

This commit is contained in:
Ferywir
2026-06-09 14:15:27 +02:00
committed by GitHub
parent d30bef0a40
commit 20804d9182
12 changed files with 501 additions and 9 deletions
+2 -1
View File
@@ -53,7 +53,8 @@ class Logging {
if (LOG_LOGIN) {
if (empty($ip)) {
$ip = $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';
// proxy-aware (issue #185): real client IP behind a trusted reverse proxy
$ip = \App\Utils\IpResolver::getClientIp() ?? ($_SERVER['REMOTE_ADDR'] ?? '0.0.0.0');
}
list($ip) = $database->escape_input($ip);