com web/php: fix blacklisted() to treat $mosquitoes as literals (not regexps): include/email-validation.inc
| From: | Hannes Magnusson | 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-21254@lists.php.net to get a copy of this message | ||
Commit: 5cda0b8979ad97fe93cc13905243281b44215332
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: 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;
}
}