From: lpsolit%gmail.com <> Date: Tue, 22 Nov 2005 03:06:15 +0000 (+0000) Subject: Bug 95799: sanitycheck.cgi should do email checks using Util::validate_email_syntax... X-Git-Tag: bugzilla-2.22rc1~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a3c2eb8b860cf888bd379fd3c997e8fdacbd8e3;p=thirdparty%2Fbugzilla.git Bug 95799: sanitycheck.cgi should do email checks using Util::validate_email_syntax() - Patch by Frédéric Buclin r=wicked a=justdave --- diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 7520430a22..1f3f27ddd3 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -29,6 +29,7 @@ use lib qw(.); require "globals.pl"; use Bugzilla::Constants; +use Bugzilla::Util; use Bugzilla::User; ########################################################################### @@ -500,13 +501,11 @@ DoubleCrossCheck("milestones", "product_id", "value", Status("Checking profile logins"); -my $emailregexp = Param("emailregexp"); SendSQL("SELECT userid, login_name FROM profiles"); while (my ($id,$email) = (FetchSQLData())) { - unless ($email =~ m/$emailregexp/) { - Alert "Bad profile email address, id=$id, <$email>." - } + validate_email_syntax($email) + || Alert "Bad profile email address, id=$id, <$email>."; } ###########################################################################