summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Util.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index dc41652f7..1a867c5ee 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -291,7 +291,7 @@ sub remote_ip {
my @x_forwarded_for = split(/[\s,]+/, $ENV{HTTP_X_FORWARDED_FOR} // '');
return $remote_ip unless @x_forwarded_for;
- return $x_forwarded_for[0] if $proxies[0] eq '*';
+ return $x_forwarded_for[0] if (@proxies && $proxies[0] eq '*');
return $remote_ip if none { $_ eq $remote_ip } @proxies;
foreach my $ip (reverse @x_forwarded_for) {