cvs: pear /Mail package.xml /Mail/Mail RFC822.php
| From: | Jon Parise | Date: | Mon, 01 Aug 2005 06:35:12 +0000 |
| Subject: | cvs: pear /Mail package.xml /Mail/Mail RFC822.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-33492@lists.php.net to get a copy of this message | ||
jon Mon Aug 1 02:35:12 2005 EDT
Modified files:
/pear/Mail package.xml
/pear/Mail/Mail RFC822.php
Log:
Mail_RFC822::isValidInetAddress() now accepts the '+' character in strict
local-parts.
Bug: 4943
http://cvs.php.net/diff.php/pear/Mail/package.xml?r1=1.28&r2=1.29&ty=u
Index: pear/Mail/package.xml
diff -u pear/Mail/package.xml:1.28 pear/Mail/package.xml:1.29
--- pear/Mail/package.xml:1.28 Mon Aug 1 02:31:56 2005
+++ pear/Mail/package.xml Mon Aug 1 02:35:11 2005
@@ -35,6 +35,7 @@
<version>1.1.7</version>
<date>2005-??-??</date>
<notes>
+- Mail_RFC822::isValidInetAddress() now accepts the '+' character in strict local-parts.
(Bug 4943)
</notes>
<state>stable</state>
http://cvs.php.net/diff.php/pear/Mail/Mail/RFC822.php?r1=1.21&r2=1.22&ty=u
Index: pear/Mail/Mail/RFC822.php
diff -u pear/Mail/Mail/RFC822.php:1.21 pear/Mail/Mail/RFC822.php:1.22
--- pear/Mail/Mail/RFC822.php:1.21 Wed May 18 13:42:37 2005
+++ pear/Mail/Mail/RFC822.php Mon Aug 1 02:35:12 2005
@@ -52,7 +52,7 @@
*
* @author Richard Heyes <richard@phpguru.org>
* @author Chuck Hagenbuch <chuck@horde.org>
- * @version $Revision: 1.21 $
+ * @version $Revision: 1.22 $
* @license BSD
* @package Mail
*/
@@ -912,7 +912,7 @@
*/
function isValidInetAddress($data, $strict = false)
{
- $regex = $strict ? '/^([.0-9a-z_-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' :
'/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';
+ $regex = $strict ? '/^([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' :
'/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';
if (preg_match($regex, trim($data), $matches)) {
return array($matches[1], $matches[2]);
} else {