Commit:    5cda0b8979ad97fe93cc13905243281b44215332
Author:    Christoph M. Becker <[email protected]>         Wed, 13 May 2015 
03:38:58 +0200
Committer: Hannes Magnusson <[email protected]>      Thu, 28 May 2015 19:57:28 -0700
Parents:   6828cd8101bcb5f51c01226b42b54acdf9bd4662
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=5cda0b8979ad97fe93cc13905243281b44215332

Log:
fix blacklisted() to treat $mosquitoes as literals (not regexps)

Changed paths:
  M  include/email-validation.inc


Diff:
diff --git a/include/email-validation.inc b/include/email-validation.inc
index 9b1ba98..6e1d03c 100644
--- a/include/email-validation.inc
+++ b/include/email-validation.inc
@@ -99,6 +99,6 @@ function blacklisted($email) {
        'graduatecentral',
     );
     foreach ($mosquitoes as $m) {
-        if (preg_match('/'.$m.'/i',$email)) return true;
+        if (preg_match('/'.preg_quote($m, '/').'/i',$email)) return true;
     }
 }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to