summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r--Bugzilla/Config/Common.pm11
-rw-r--r--Bugzilla/Config/Core.pm3
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,
},
{