]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 95799: sanitycheck.cgi should do email checks using Util::validate_email_syntax...
authorlpsolit%gmail.com <>
Tue, 22 Nov 2005 03:06:15 +0000 (03:06 +0000)
committerlpsolit%gmail.com <>
Tue, 22 Nov 2005 03:06:15 +0000 (03:06 +0000)
sanitycheck.cgi

index 7520430a22bba2b9e0ed5543ced87e00e73ce58e..1f3f27ddd3e65e235fb88c5e132205ffa23d3d77 100755 (executable)
@@ -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,  &lt;$email&gt;."
-    }
+    validate_email_syntax($email)
+      || Alert "Bad profile email address, id=$id,  &lt;$email&gt;.";
 }
 
 ###########################################################################