Commit:    c9684312a6a51646468da3f180b88f2943ad176c
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:   c8f5f58dcf8f745fd619982b6ae04d1b43ae6355
Branches:  master

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

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