Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #17317 Invalid periods in mailbox not marked as invalid
Submitted: 2010-04-16 21:55 UTC
From: ray_harris Assigned: alec
Status: Closed Package: Mail (version 1.2.0)
PHP Version: 5.3.0 OS: Vista
Roadmaps: (Not assigned)    

 [2010-04-16 21:55 UTC] ray_harris (Ray Harris)
Description: ------------ Both RFC822 and RFC2822 prohibit the local part of an address from beginning with a dot, ending with a dot, or containing two consecutive dots. When using the Mail_RFC822::parseAddressList function, email addresses with these errors are not marked as invalid. Invalid Addresses: All are reported as valid by parseAddressList. Test script: --------------- require_once 'Mail/RFC822.php'; $addr1 = ''; $addr2 = ''; $addr3 = ''; $result1 = Mail_RFC822::parseAddressList($addr1); $result2 = Mail_RFC822::parseAddressList($addr2); $result3 = Mail_RFC822::parseAddressList($addr3); var_dump($result1, $result2, $result3); Expected result: ---------------- Results should be PEAR_Error objects. Expected value for $result1 without backtrace: object(PEAR_Error)[2] public 'error_message_prefix' => string '' (length=0) public 'mode' => int 1 public 'level' => int 1024 public 'code' => null public 'message' => string 'Validation failed for:' (length=41) public 'userinfo' => null Actual result: -------------- Results are anonymous address object arrays. Actual value for $result1: array 0 => object(stdClass)[2] public 'personal' => string '' (length=0) public 'comment' => array empty public 'mailbox' => string '.name' (length=5) public 'host' => string '' (length=11)


 [2011-01-15 00:52 UTC] alec (Aleksander Machniak)
-Status: Open +Status: Closed -Assigned To: +Assigned To: alec -Roadmap Versions: +Roadmap Versions: 1.2.1
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.