cvs: pear /Mail/Mail RFC822.php

From: Date: Wed, 18 May 2005 17:42:37 +0000
Subject: cvs: pear /Mail/Mail RFC822.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-31909@lists.php.net to get a copy of this message
chagenbu Wed May 18 13:42:37 2005 EDT Modified files: /pear/Mail/Mail RFC822.php Log: fix validateQuotedString check (pear bug #2931). http://cvs.php.net/diff.php/pear/Mail/Mail/RFC822.php?r1=1.20&r2=1.21&ty=u Index: pear/Mail/Mail/RFC822.php diff -u pear/Mail/Mail/RFC822.php:1.20 pear/Mail/Mail/RFC822.php:1.21 --- pear/Mail/Mail/RFC822.php:1.20 Sun Jan 9 18:55:13 2005 +++ pear/Mail/Mail/RFC822.php Wed May 18 13:42:37 2005 @@ -52,7 +52,7 @@ * * @author Richard Heyes <richard@phpguru.org> * @author Chuck Hagenbuch <chuck@horde.org> - * @version $Revision: 1.20 $ + * @version $Revision: 1.21 $ * @license BSD * @package Mail */ @@ -586,8 +586,8 @@ // Leading and trailing " $qstring = substr($qstring, 1, -1); - // Perform check. - return !(preg_match('/(.)[\x0D\\\\"]/', $qstring, $matches) && $matches[1] != '\\'); + // Perform check, removing quoted characters first. + return !preg_match('/[\x0D\\\\"]/', preg_replace('/\\\\./', '', $qstring)); } /**

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