Bug #80259 [Com]: Bad handling of RFC 2047 in case of folding white space

From: Date: Mon, 26 Dec 2022 08:54:03 +0000
Subject: Bug #80259 [Com]: Bad handling of RFC 2047 in case of folding white space
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243245@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80259&edit=1 ID: 80259 Comment by: marlynrasavong at gmail dot com Reported by: om+bugs dot php dot net at miakinen dot net Summary: Bad handling of RFC 2047 in case of folding white space Status: Verified Type: Bug Package: ICONV related Operating System: Linux PHP Version: 7.3 Block user comment: N Private report: N New Comment: Have you got solution for this . (https://www.connectebt.us/)github.com Previous Comments: ------------------------------------------------------------------------ [2021-04-14 14:02:07] cmb@php.net The following pull request has been associated: Patch Name: Fix #80259: Bad handling of RFC 2047 in case of folding white space On GitHub: https://github.com/php/php-src/pull/6865 Patch: https://github.com/php/php-src/pull/6865.patch ------------------------------------------------------------------------ [2020-10-19 21:57:44] cmb@php.net Confirmed: <https://3v4l.org/RmjD0>. ------------------------------------------------------------------------ [2020-10-19 21:38:06] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80259&edit=1

« previous php.bugs (#243245) next »