summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-03-25 23:32:18 +0100
committerbugreport%peshkin.net <>2004-03-25 23:32:18 +0100
commit18f242c49574d42ff2c06c6b75f4fd6281b8980f (patch)
tree28cd4db91af065827be0272f75864ee5d82f052f
parent151bd229726f9e248f23a79eb5215471a5945ca6 (diff)
downloadbugzilla-18f242c49574d42ff2c06c6b75f4fd6281b8980f.tar.gz
bugzilla-18f242c49574d42ff2c06c6b75f4fd6281b8980f.tar.xz
Bug 127862:Have sanitycheck.cgi use perl to evaluate email regexp
r=vlad,a=justdave
-rwxr-xr-xsanitycheck.cgi9
1 files changed, 4 insertions, 5 deletions
diff --git a/sanitycheck.cgi b/sanitycheck.cgi
index 1d9a994b5..8060c1c99 100755
--- a/sanitycheck.cgi
+++ b/sanitycheck.cgi
@@ -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;."
+ }
}
###########################################################################