php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26912 imap_rfc822_parse_adrlist fails decoding
Submitted: 2004-01-14 19:03 UTC Modified: 2004-01-14 19:47 UTC
From: lars at kneschke dot de Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.3.4 OS: Gentoo
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lars at kneschke dot de
New email:
PHP Version: OS:

 

 [2004-01-14 19:03 UTC] lars at kneschke dot de
Description:
------------
imap_rfc822_parse_adrlist fails when it should decode emailadresses using following format

test@test.de <test@test.de>

It gets confused by the first @ .

Changing the string to

test\@test.de <test@test.de>

makes it working.

Reproduce code:
---------------
$testSting = "test1@test.de <test2@test.de>";
print "<pre>";
print_r(imap_rfc822_parse_adrlist($testString,''));
print "</pre>";

Expected result:
----------------
Array
(
    [0] => stdClass Object
        (
            [mailbox] => test2
            [host] => lists.net
            [personal] => test1@lists.net
        )

)

Actual result:
--------------
Array
(
    [0] => stdClass Object
        (
            [mailbox] => test1
            [host] => lists.net
        )

    [1] => stdClass Object
        (
            [mailbox] => UNEXPECTED_DATA_AFTER_ADDRESS
            [host] => .SYNTAX-ERROR.
        )

)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-14 19:37 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

If this is a bug then it's a bug in the imap library. The 
PHP function is not much more then a wrapper around an imap 
function which actually does the address parsing. 
 [2004-01-14 19:47 UTC] lars at kneschke dot de
I did fear that...

Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC