com web/php: fix blacklisted() to treat $mosquitoes as literals (not regexps): include/email-validation.inc
| From: | Paul Dragoonis | Date: | Fri, 29 May 2015 02:57:28 +0000 |
| Subject: | com web/php: fix blacklisted() to treat $mosquitoes as literals (not regexps): include/email-validation.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-21638@lists.php.net to get a copy of this message | ||
Commit: c9684312a6a51646468da3f180b88f2943ad176c
Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 13 May 2015 03:38:58 +0200
Committer: Hannes Magnusson <bjori@php.net> 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;
}
}