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 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: 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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 04:01:28 2024 UTC