From b5271cab904a4802b04caa5cf3f08d8d80272183 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 3 Nov 2015 22:22:31 +0000 Subject: Bug 1220734 - Use of uninitialized value $proxies[0] in string eq at Bugzilla/Util.pm line 315. --- Bugzilla/Util.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 19444082f..2703a542e 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -312,7 +312,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) { -- cgit v1.2.3-24-g4f1b