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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat Dec 21 16:01:28 2024 UTC