diff options
author | Dylan William Hardison <dylan@hardison.net> | 2015-10-28 03:27:34 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2015-10-28 03:28:03 +0100 |
commit | 175f9c1022672ae8d47c93ad0cf31084eb868ecb (patch) | |
tree | 75917b225847248910adcea2f686ed20b2b009c5 /Bugzilla/Config/Advanced.pm | |
parent | f521f52eaee19967ef5898cad3c8cf1cd8b84675 (diff) | |
download | bugzilla-175f9c1022672ae8d47c93ad0cf31084eb868ecb.tar.gz bugzilla-175f9c1022672ae8d47c93ad0cf31084eb868ecb.tar.xz |
Bug 1217536 - allow inbound_proxy supports '*'
Diffstat (limited to 'Bugzilla/Config/Advanced.pm')
-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 4b57df24d..893213b02 100644 --- a/Bugzilla/Config/Advanced.pm +++ b/Bugzilla/Config/Advanced.pm @@ -47,7 +47,7 @@ use constant get_param_list => ( name => 'inbound_proxies', type => 't', default => '', - checker => \&check_ip + checker => \&check_inbound_proxies }, { @@ -108,4 +108,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; |