summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r--Bugzilla/Config/Advanced.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/Bugzilla/Config/Advanced.pm b/Bugzilla/Config/Advanced.pm
index 75afe7b22..b3968a254 100644
--- a/Bugzilla/Config/Advanced.pm
+++ b/Bugzilla/Config/Advanced.pm
@@ -26,7 +26,7 @@ use constant get_param_list => (
name => 'inbound_proxies',
type => 't',
default => '',
- checker => \&check_ip
+ checker => \&check_inbound_proxies
},
{
@@ -44,4 +44,15 @@ use constant get_param_list => (
},
);
+sub check_inbound_proxies {
+ my $inbound_proxies = shift;
+
+ return "" if $inbound_proxies eq "*";
+ my @proxies = split(/[\s,]+/, $inbound_proxies);
+ foreach my $proxy (@proxies) {
+ validate_ip($proxy) || return "$proxy is not a valid IPv4 or IPv6 address";
+ }
+ return "";
+}
+
1;