diff options
author | Derick Rethans <derick@php.net> | 2006-12-20 14:39:01 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2006-12-20 14:39:01 +0000 |
commit | a9d0abf82c716f32b472d4d78fbfd2fd11f372b0 (patch) | |
tree | 407879b6a277966e3ed296ad2689e8f3c2c1868a | |
parent | 0f2eed24bb6e4961f5839bd808a87fb294671f2d (diff) | |
download | php-git-a9d0abf82c716f32b472d4d78fbfd2fd11f372b0.tar.gz |
- Fixed the validate email filter so that the letter "v" can also be used in
the user part of the email address. (Derick)
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/filter/logical_filters.c | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -10,7 +10,9 @@ PHP NEWS . canary protection (debug build only) . random generation of cookies and canaries - Fixed incorrect function names on FreeBSD where inet_pton() was named - __inet_pton() and inet_ntop() was named __inet_ntop() (Hannes) + __inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes) +- Fixed the validate email filter so that the letter "v" can also be used in + the user part of the email address. (Derick) - Fixed bug #39869 (safe_read does not initialize errno). (michiel at boland dot org, Dmitry) diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 7596108f09..e231a3ed43 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -501,7 +501,7 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ { /* From http://cvs.php.net/co.php/pear/HTML_QuickForm/QuickForm/Rule/Email.php?r=1.4 */ - const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\v\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/"; + const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/"; pcre *re = NULL; pcre_extra *pcre_extra = NULL; |