]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 127862:Have sanitycheck.cgi use perl to evaluate email regexp
authorbugreport%peshkin.net <>
Thu, 25 Mar 2004 22:32:18 +0000 (22:32 +0000)
committerbugreport%peshkin.net <>
Thu, 25 Mar 2004 22:32:18 +0000 (22:32 +0000)
r=vlad,a=justdave

sanitycheck.cgi

index 1d9a994b5f8752562580c50bff6ee33aa1656ac3..8060c1c9974c2b301769893e9b43a07a6f5d2dc0 100755 (executable)
@@ -418,13 +418,12 @@ DoubleCrossCheck("milestones", "product_id", "value",
 Status("Checking profile logins");
 
 my $emailregexp = Param("emailregexp");
-$emailregexp =~ s/'/\\'/g;
-SendSQL("SELECT userid, login_name FROM profiles " .
-        "WHERE login_name NOT REGEXP '" . $emailregexp . "'");
-
+SendSQL("SELECT userid, login_name FROM profiles");
 
 while (my ($id,$email) = (FetchSQLData())) {
-    Alert "Bad profile email address, id=$id,  &lt;$email&gt;."
+    unless ($email =~ m/$emailregexp/) {
+        Alert "Bad profile email address, id=$id,  &lt;$email&gt;."
+    }
 }
 
 ###########################################################################