Skip to content

Commit 17840d3

Browse files
authored
[PHP] Add check for basicphp (the-benchmarker#2425)
1 parent 6ce5d2c commit 17840d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

php/basicphp/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function firewall()
290290
if (FIREWALL_ON == true) {
291291

292292
// Allow only access from whitelisted IP addresses
293-
if (! in_array($_SERVER['REMOTE_ADDR'], ALLOWED_IP_ADDR)) {
293+
if (isset($_SERVER['REMOTE_ADDR']) && !in_array($_SERVER['REMOTE_ADDR'], ALLOWED_IP_ADDR)) {
294294
header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden");
295295
exit('<p>You are not allowed to access the application using your IP address.</p>');
296296
}

0 commit comments

Comments
 (0)