cvs: pear /Mail package.xml /Mail/Mail RFC822.php

From: Date: Thu, 09 Sep 2004 01:12:50 +0000
Subject: cvs: pear /Mail package.xml /Mail/Mail RFC822.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23736@lists.php.net to get a copy of this message
jon Wed Sep 8 21:12:50 2004 EDT Modified files: /pear/Mail package.xml /pear/Mail/Mail RFC822.php Log: Section 6.2.4 of RFC 822 states that the "local part" of the address may not contain unquoted spaces. Bug: 1869 http://cvs.php.net/diff.php/pear/Mail/package.xml?r1=1.21&r2=1.22&ty=u Index: pear/Mail/package.xml diff -u pear/Mail/package.xml:1.21 pear/Mail/package.xml:1.22 --- pear/Mail/package.xml:1.21 Wed Sep 8 20:41:14 2004 +++ pear/Mail/package.xml Wed Sep 8 21:12:49 2004 @@ -39,6 +39,7 @@ - Header fields (e.g., 'Cc', 'Bcc') may now be specified as arrays of addresses. (Colin Viebrock) - PHP5 compatibility fix (Bug #1563). - PHP4 / Win32 compatibility fix for the 'sendmail' driver (Bug 1881). +- Stricter "local part" parsing for Mail_RFC822 (in accordance with Section 6.2.4 of RFC 822) (Bug 1869). </notes> <state>stable</state> <filelist> http://cvs.php.net/diff.php/pear/Mail/Mail/RFC822.php?r1=1.17&r2=1.18&ty=u Index: pear/Mail/Mail/RFC822.php diff -u pear/Mail/Mail/RFC822.php:1.17 pear/Mail/Mail/RFC822.php:1.18 --- pear/Mail/Mail/RFC822.php:1.17 Wed Sep 8 20:46:51 2004 +++ pear/Mail/Mail/RFC822.php Wed Sep 8 21:12:49 2004 @@ -52,7 +52,7 @@ * * @author Richard Heyes <richard@phpguru.org> * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.17 $ + * @version $Revision: 1.18 $ * @license BSD * @package Mail */ @@ -867,6 +867,12 @@ // Validate each word. foreach ($words as $word) { + // If this word contains an unquoted space, it is invalid. (6.2.4) + if (strpos($word, ' ') && $word[0] !== '"') + { + return false; + } + if ($this->_validatePhrase(trim($word)) === false) return false; }

« previous php.pear.cvs (#23736) next »