aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-03-25 22:32:18 +0000
committerbugreport%peshkin.net <>2004-03-25 22:32:18 +0000
commit18f242c49574d42ff2c06c6b75f4fd6281b8980f (patch)
tree28cd4db91af065827be0272f75864ee5d82f052f /sanitycheck.cgi
parentPatch for bug 218206: document ft_min_word_len MySQL param for indexing small... (diff)
downloadbugzilla-18f242c49574d42ff2c06c6b75f4fd6281b8980f.tar.gz
bugzilla-18f242c49574d42ff2c06c6b75f4fd6281b8980f.tar.bz2
bugzilla-18f242c49574d42ff2c06c6b75f4fd6281b8980f.zip
Bug 127862:Have sanitycheck.cgi use perl to evaluate email regexp
r=vlad,a=justdave
Diffstat (limited to 'sanitycheck.cgi')
-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;."
+ }
}
###########################################################################