php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8481 imap_rfc822_parse_adrlist is too STRICT
Submitted: 2000-12-29 12:44 UTC Modified: 2001-05-03 15:23 UTC
From: rxdev at serianet dot com Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.0.4 OS: Linux 2.2.18/Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rxdev at serianet dot com
New email:
PHP Version: OS:

 

 [2000-12-29 12:44 UTC] rxdev at serianet dot com
Imap_rfc822_parse_adrlist is too strict: if a double ,, is present in addresslist, then the parsing fails and stops (and gives various SYNTAX-ERROR/INVALID HOST)
This is really annoying as many users type double ,, or even , , (a comma, a space, a comma) causing most of recipients to be dropped if Imap_rfc822_parse_adrlist is used.

Example:
imap_rfc822_parse_adrlist("smith,jeff,paul","foobar.com")
WORKS
  -BUT-
imap_rfc822_parse_adrlist("smith,,jeff,paul","foobar.com")
DOES NOT WORK: only "smith" is extracted, BUT jeff and paul aren't

Workaround: while exploding recipient list, just IGNORE empty recipient as if they didn't exist (and of course continue parsing)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-03 15:23 UTC] chagenbu@php.net
This is the behavior of the underlying c-client function. If you want looser parsing, see PEAR's Mail_RFC822 class, which among other things has an option to turn validation off.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 20 13:03:32 2021 UTC