cvs: pear /Validate Validate.php package.xml /Validate/tests bug8853.phpt
| From: | Amir Mohammad Saied | Date: | Thu, 05 Oct 2006 04:41:35 +0000 |
| Subject: | cvs: pear /Validate Validate.php package.xml /Validate/tests bug8853.phpt | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42418@lists.php.net to get a copy of this message | ||
amir Thu Oct 5 04:41:35 2006 UTC
Added files:
/pear/Validate/tests bug8853.phpt
Modified files:
/pear/Validate Validate.php package.xml
Log:
Fixing #8853, E-Mail validation allows space before TLD
http://cvs.php.net/viewvc.cgi/pear/Validate/Validate.php?r1=1.97&r2=1.98&diff_format=u
Index: pear/Validate/Validate.php
diff -u pear/Validate/Validate.php:1.97 pear/Validate/Validate.php:1.98
--- pear/Validate/Validate.php:1.97 Thu Oct 5 04:29:21 2006
+++ pear/Validate/Validate.php Thu Oct 5 04:41:35 2006
@@ -32,7 +32,7 @@
* @author Pierre-Alain Joye <pajoye@php.net>
* @copyright 1997-2005 Pierre-Alain Joye,Tomas V.V.Cox
* @license http://www.opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: Validate.php,v 1.97 2006/10/05 04:29:21 amir Exp $
+ * @version CVS: $Id: Validate.php,v 1.98 2006/10/05 04:41:35 amir Exp $
* @link http://pear.php.net/package/Validate
*/
@@ -286,7 +286,7 @@
(?:(?:(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9]))\.){3}
(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9]))))(?(5)\])|
((?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?\.)*[a-z0-9](?:[-a-z0-9]*[a-z0-9])?) #6 domain as
hostname
- \.((?:([^-])[-a-z]*[-a-z])?)) #7 ICANN domain names
+ \.((?:([^- ])[-a-z]*[-a-z])?)) #7 TLD
$&xi';
if ($use_rfc822? Validate::__emailRFC822($email, $options) :
http://cvs.php.net/viewvc.cgi/pear/Validate/package.xml?r1=1.72&r2=1.73&diff_format=u
Index: pear/Validate/package.xml
diff -u pear/Validate/package.xml:1.72 pear/Validate/package.xml:1.73
--- pear/Validate/package.xml:1.72 Thu Oct 5 04:29:21 2006
+++ pear/Validate/package.xml Thu Oct 5 04:41:35 2006
@@ -48,14 +48,15 @@
<release>
<version>0.6.5</version>
<state>beta</state>
- <date>2006-09-20</date>
+ <date>2006-10-05</date>
<notes>
- __stringToUtf7():
* #8442, Preventing a Notice
- email():
* #8629, hostnames starting with numbers are valid because of their popularity
+ * #8853, E-Mail validation allows space before TLD.
- date():
- * #8851, date-validation doesn't allow letters in time.
+ * #8851, date-validation allows letters in time.
</notes>
<filelist>
<dir name="/">
http://cvs.php.net/viewvc.cgi/pear/Validate/tests/bug8853.phpt?view=markup&rev=1.1
Index: pear/Validate/tests/bug8853.phpt
+++ pear/Validate/tests/bug8853.phpt
--TEST--
#8853, validate::email: E-Mail validation allows space before TLD
--FILE--
<?php
require_once 'Validate.php';
if (!validate::email("john@doe. com")) {
echo "Ok\n";
}
?>
--EXPECT--
Ok