|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77147 iconv_mime_decode_headers ignores ICONV_MIME_DECODE_CONTINUE_ON_ERROR flag
Submitted: 2018-11-13 22:42 UTC Modified: 2018-11-13 22:44 UTC
From: shafer_w2002 at yahoo dot com Assigned: cmb (profile)
Status: Closed Package: ICONV related
PHP Version: 7.1.24 OS: N/A
Private report: No CVE-ID: None
 [2018-11-13 22:42 UTC] shafer_w2002 at yahoo dot com
The fix for bug ignores the ICONV_MIME_DECODE_CONTINUE_ON_ERROR flag and false the parse.   Prior to 7.1.22 parsing headers with erogenous characters worked fine, or as good as you were going to get anyway.

The previous behavior should be respected (ignoring these broken chars) when ICONV_MIME_DECODE_CONTINUE_ON_ERROR is set, as per the php manual.

Test script:

$string = <<<EOF
Feedback-ID: 014a93e3-1f5e-4df6-b347-6b59f0f746b8:b5891053-55d1-45bc-a0b5-47a7a9b59687:email:epslh1�

$headers = iconv_mime_decode_headers($string, ICONV_MIME_DECODE_CONTINUE_ON_ERROR);


Expected result:
    [Feedback-ID] => 014a93e3-1f5e-4df6-b347-6b59f0f746b8:b5891053-55d1-45bc-a0b5-47a7a9b59687:email:epslh1

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-13 22:44 UTC]
-Assigned To: +Assigned To: cmb
 [2018-11-14 14:01 UTC]
Automatic comment on behalf of
Log: Fix #77147: Fix for 60494 ignores ICONV_MIME_DECODE_CONTINUE_ON_ERROR
 [2018-11-14 14:01 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 13:01:36 2024 UTC