Merge pull request #698 from wrongecho/fix-braces

Functions.php - IP checker - braces
This commit is contained in:
Johnny 2023-06-14 19:17:46 -04:00 committed by GitHub
commit 8a33a45d20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

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