php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80259 Bad handling of RFC 2047 in case of folding white space
Submitted: 2020-10-19 21:38 UTC Modified: 2020-10-19 21:57 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: om+bugs dot php dot net at miakinen dot net Assigned:
Status: Verified Package: ICONV related
PHP Version: 7.3 OS: Linux
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: om+bugs dot php dot net at miakinen dot net
New email:
PHP Version: OS:

 

 [2020-10-19 21:38 UTC] om+bugs dot php dot net at miakinen dot net
Description:
------------
---
From manual page: https://php.net/function.iconv-mime-decode
---

When there is a MIME encoded-word followed by a folding-white-space
(CR+LF+SPACE) followed by a simple word (not MIME encoded-word), the
function iconv_mime_decode doesn't add a space in between.

It works OK without the CR+LF.


My exact PHP version:

PHP 7.2.24-0ubuntu0.18.04.7 (cli) (built: Oct  7 2020 15:24:25) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.24-0ubuntu0.18.04.7, Copyright (c) 1999-2018, by Zend Technologies


Test script:
---------------
<?php
printf("%s\n", iconv_mime_decode("=?UTF-8?Q?two?= words"));
printf("%s\n", iconv_mime_decode("=?UTF-8?Q?two?=\r\n words"));
?>


Expected result:
----------------
two words
two words


Actual result:
--------------
two words
twowords


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-19 21:57 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: *General Issues +Package: ICONV related -PHP Version: 7.2.34 +PHP Version: 7.3
 [2020-10-19 21:57 UTC] cmb@php.net
Confirmed: <https://3v4l.org/RmjD0>.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 23:01:24 2020 UTC