Bug #63839 [Asn->Ver]: iconv_mime_decode_headers function is skipping headers

From: Date: Wed, 09 Sep 2015 12:46:52 +0000
Subject: Bug #63839 [Asn->Ver]: iconv_mime_decode_headers function is skipping headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195906@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63839&edit=1 ID: 63839 Updated by: cmb@php.net Reported by: nidhikaushal28 at gmail dot com Summary: iconv_mime_decode_headers function is skipping headers -Status: Assigned +Status: Verified Type: Bug Package: ICONV related Operating System: Windows 7, CentOS PHP Version: 5.3.20 Assigned To: aharvey Block user comment: N Private report: N New Comment: Confirmed: <https://3v4l.org/9Yb90> Apparently a problem with wrong detection of encoded words. Previous Comments: ------------------------------------------------------------------------ [2013-01-08 16:52:55] Chandakme at gmail dot com I am also facing same issue and would like to hear more about it? ------------------------------------------------------------------------ [2012-12-23 14:48:08] nidhikaushal28 at gmail dot com Description: ------------ iconv_mime_decode_headers function is skipping headers when '=?' is present in the subject. For example if the subject header of a mime message is : Subject: Reply Is? white side-LED =? in Help Then the rest of the headers after subject like content-type, date etc are not returned. Similar bug is filed https://bugs.php.net/bug.php?id=52941 but in the above mentioned example the subject is not encoded. My php version is 5.3.3 and the issue is reproducible in 5.3.20 and 5.4.10. Test script: --------------- <?php $headers = 'From: "xyz" <xyz@xyz.com> To: <xyz@xyz.com> Subject: Reply Is? white side-LED =? in Help Date: Sat, 22 Dec 2012 Message-ID: <006f01cde00e$d9f79da0$8de6d8e0> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac3gDtcH2huHjzYcQVmFJPPoWjJogA== Content-Language: en-us '; $headers = iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR); print_r($headers); ?> Expected result: ---------------- Array ( [From] => "xyz" <xyz@xyz.com> [To] => <xyz@xyz.com> [Subject] => Reply Is? white side-LED =? in Help [Date] => Sat, 22 Dec 2012 [Message-ID] => <006f01cde00e$d9f79da0$8de6d8e0> [MIME-Version] => 1.0 [Content-Type] => multipart/alternative; boundary="----=_NextPart_000_0070_0 1CDE03C.F3AFD9A0" [X-Mailer] => Microsoft Office Outlook 12.0 [Thread-Index] => Ac3gDtcH2huHjzYcQVmFJPPoWjJogA== [Content-Language] => en-us ) Actual result: -------------- Array ( [From] => "xyz" <xyz@xyz.com> [To] => <xyz@xyz.com> [Subject] => Reply Is? white side-LED ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63839&edit=1

« previous php.bugs (#195906) next »