diff options
author | mkanat%bugzilla.org <> | 2009-12-13 21:46:24 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-12-13 21:46:24 +0100 |
commit | 72cb2bc73e71f54c2223bb78af29fee888590b53 (patch) | |
tree | 45aacc0944bd4b7d4b7391b0bff7bc67b15c722e /Bugzilla/Config | |
parent | cb4a8bf4954c38d06358c4a7509f3fac6fb1e705 (diff) | |
download | bugzilla-72cb2bc73e71f54c2223bb78af29fee888590b53.tar.gz bugzilla-72cb2bc73e71f54c2223bb78af29fee888590b53.tar.xz |
Bug 355283: Lock out a user account on a particular IP for 30 minutes if they fail to log in 5 times from that IP.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r-- | Bugzilla/Config/Common.pm | 11 | ||||
-rw-r--r-- | Bugzilla/Config/Core.pm | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index 95866b032..6924761f3 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -34,6 +34,7 @@ package Bugzilla::Config::Common; use strict; +use Email::Address; use Socket; use Bugzilla::Util; @@ -50,7 +51,7 @@ use base qw(Exporter); check_user_verify_class check_mail_delivery_method check_notification check_utf8 check_bug_status check_smtp_auth check_theschwartz_available - check_maxattachmentsize + check_maxattachmentsize check_email ); # Checking functions for the various values @@ -94,6 +95,14 @@ sub check_regexp { return $@; } +sub check_email { + my ($value) = @_; + if ($value !~ $Email::Address::mailbox) { + return "must be a valid email address."; + } + return ""; +} + sub check_sslbase { my $url = shift; if ($url ne '') { diff --git a/Bugzilla/Config/Core.pm b/Bugzilla/Config/Core.pm index 91426b30a..1bfebfa69 100644 --- a/Bugzilla/Config/Core.pm +++ b/Bugzilla/Config/Core.pm @@ -43,7 +43,8 @@ sub get_param_list { { name => 'maintainer', type => 't', - default => 'THE MAINTAINER HAS NOT YET BEEN SET' + default => 'please.set.the.maintainer.parameter@administration.parameters', + checker => \&check_email, }, { |