Merge pull request #686 from bhopkins0/patch-2

Security enchancement for getIP() function
This commit is contained in:
Johnny
2023-05-20 11:30:49 -04:00
committed by GitHub

View File

@@ -85,6 +85,9 @@ function getIP() {
} else {
$ip = $_SERVER["HTTP_CF_CONNECTING_IP"] ?? $_SERVER['REMOTE_ADDR'];
}
if (!filter_var($ip, FILTER_VALIDATE_IP))
die("Potential Security Violation");
return $ip;
}