diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-05-01 17:37:15 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-05-01 17:37:15 +0200 |
commit | b9ce8358e9822243421a37548e3d1f0371b97455 (patch) | |
tree | 37e983d92587ee30f93c35109200567e499ec491 /Bugzilla/Config/Common.pm | |
parent | 228c7bf9ea03a5faafe22f003e5d56da1b7b2162 (diff) | |
parent | 07c6bfa4cea83c8284b04add26729f552c93bafc (diff) | |
download | bugzilla-b9ce8358e9822243421a37548e3d1f0371b97455.tar.gz bugzilla-b9ce8358e9822243421a37548e3d1f0371b97455.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/Config/Common.pm')
-rw-r--r-- | Bugzilla/Config/Common.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index 9fffe02ee..00c699217 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -48,7 +48,7 @@ use base qw(Exporter); qw(check_multi check_numeric check_regexp check_url check_group check_sslbase check_priority check_severity check_platform check_opsys check_shadowdb check_urlbase check_webdotbase - check_user_verify_class + check_user_verify_class check_ip check_mail_delivery_method check_notification check_utf8 check_bug_status check_smtp_auth check_theschwartz_available check_maxattachmentsize check_email @@ -129,6 +129,15 @@ sub check_sslbase { return ""; } +sub check_ip { + my $inbound_proxies = shift; + my @proxies = split(/[\s,]+/, $inbound_proxies); + foreach my $proxy (@proxies) { + validate_ip($proxy) || return "$proxy is not a valid IPv4 or IPv6 address"; + } + return ""; +} + sub check_utf8 { my $utf8 = shift; # You cannot turn off the UTF-8 parameter if you've already converted |