php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #49141 iconv_mime_encode broken by design for some headers
Submitted: 2009-08-03 14:02 UTC Modified: 2009-08-03 16:36 UTC
From: rch at online dot lt Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.10 OS: Centos 5.3
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: rch at online dot lt
New email:
PHP Version: OS:

 

 [2009-08-03 14:02 UTC] rch at online dot lt
Description:
------------
iconv_mime_encode is supposed to compose and return a string that represents a valid MIME  header field.

However, headers like To, CC and others with email addresses don't fit into simple $field_name => $field_value scheme.  Please note that these arguments may contain user submitted data and would contain any characters.

The function should accept extra argument(s) for email addresses, and check/encode characters like "'<> with quoted-printable encoding too, and others if needed, and do not encode ascii strings that should not be encoded.  Please see http://www.faqs.org/rfcs/rfc2822 for valid email header syntax.


Reproduce code:
---------------
---
From manual page: function.iconv-mime-encode
---



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-03 16:36 UTC] moriyoshi@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This function is not designed to encode such headers in the first place. BTW rfc2822 is outdated. RFC5322 is the update.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 16:01:31 2024 UTC