From: bugreport%peshkin.net <> Date: Thu, 25 Mar 2004 22:32:18 +0000 (+0000) Subject: Bug 127862:Have sanitycheck.cgi use perl to evaluate email regexp X-Git-Tag: bugzilla-2.18rc1~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18f242c49574d42ff2c06c6b75f4fd6281b8980f;p=thirdparty%2Fbugzilla.git Bug 127862:Have sanitycheck.cgi use perl to evaluate email regexp r=vlad,a=justdave --- diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 1d9a994b5f..8060c1c997 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, <$email>." + unless ($email =~ m/$emailregexp/) { + Alert "Bad profile email address, id=$id, <$email>." + } } ###########################################################################