aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 0a9084eb6d..351d284c62 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -168,14 +168,9 @@ class session
// check IPv4 first, the IPv6 is hopefully only going to be used very seldomly
if (!empty($ip) && !preg_match($ipv4, $ip) && !preg_match($ipv6, $ip))
{
- if (!defined('DEBUG_EXTRA'))
- {
- trigger_error('Hacking attempt!');
- }
- else
- {
- trigger_error('Invalid HTTP_X_FORWARDED_FOR header detected: ' . htmlspecialchars($this->forwarded_for));
- }
+ // contains invalid data, don't use the forwarded for header
+ $this->forwarded_for = '';
+ break;
}
}
}