Skip to content

Commit b5271ca

Browse files
committed
Bug 1220734 - Use of uninitialized value $proxies[0] in string eq at Bugzilla/Util.pm line 315.
1 parent 2c08375 commit b5271ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Bugzilla/Util.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ sub remote_ip {
312312
my @x_forwarded_for = split(/[\s,]+/, $ENV{HTTP_X_FORWARDED_FOR} // '');
313313

314314
return $remote_ip unless @x_forwarded_for;
315-
return $x_forwarded_for[0] if $proxies[0] eq '*';
315+
return $x_forwarded_for[0] if @proxies && $proxies[0] eq '*';
316316
return $remote_ip if none { $_ eq $remote_ip } @proxies;
317317

318318
foreach my $ip (reverse @x_forwarded_for) {

0 commit comments

Comments
 (0)