diff options
author | Dylan William Hardison <dylan@hardison.net> | 2016-07-04 17:43:44 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2016-07-08 18:09:52 +0200 |
commit | dfc33c89b8cac25951867a2e6821120c92bb055b (patch) | |
tree | f9879d1afdaf0c4b2928d32306cf8ec56aa73607 /Bugzilla/Config | |
parent | 3f75ddd65da6a5753fa90b429ed6f43b4eeae088 (diff) | |
download | bugzilla-dfc33c89b8cac25951867a2e6821120c92bb055b.tar.gz bugzilla-dfc33c89b8cac25951867a2e6821120c92bb055b.tar.xz |
Bug 1284277 - allow inbound_proxy to be set to '*'
r=dkl
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r-- | Bugzilla/Config/Advanced.pm | 13 |
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; |