php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36806 iconv_mime_decode case-sensitivity for encoding token ('B' or 'Q')
Submitted: 2006-03-20 21:42 UTC Modified: 2006-03-21 09:27 UTC
From: jgoldsmith at returnpath dot net Assigned:
Status: Closed Package: ICONV related
PHP Version: 5.1.2 OS: FC4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
28 - 25 = ?
Subscribe to this entry?

 
 [2006-03-20 21:42 UTC] jgoldsmith at returnpath dot net
Description:
------------
iconv_mime_decode doesn't recognize lower-case encoding tokens  ('b' or 'q'). These are acceptible according to the MIME RFC (http://www.ietf.org/rfc/rfc2047.txt).

Here is a fix. Edit file: /ext/iconv/iconv.c

Line: 1398
Change
case 'B':
to
case 'B': case 'b':

Line 1403
Change
case 'Q':
to
case 'Q': case 'q':

Reproduce code:
---------------
$string = '=?UTF-8?b?VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZyE=?=';
echo iconv_mime_decode($string,1);

Expected result:
----------------
This is an encoded string!

Actual result:
--------------
Warning: iconv_mime_decode() [function.iconv-mime-decode]: Malformed string

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-20 21:49 UTC] tony2001@php.net
Fixed month ago.
 [2006-03-21 09:27 UTC] derick@php.net
In CVS that is... this fix will make it into 5.1.3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC