Bug #75979 [Opn->Nab]: mb_encode_mimeheader invalid MIME quoted-printable
| From: | cmb@php.net | Date: | Thu, 13 Feb 2020 22:35:53 +0000 |
| Subject: | Bug #75979 [Opn->Nab]: mb_encode_mimeheader invalid MIME quoted-printable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225572@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75979&edit=1
ID: 75979
Updated by: cmb@php.net
Reported by: azurit at pobox dot sk
Summary: mb_encode_mimeheader invalid MIME quoted-printable
-Status: Open
+Status: Not a bug
Type: Bug
Package: mbstring related
Operating System: linux
PHP Version: 7.2.2
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
While it is correct that a colon must be quoted inside an
encoded-word, there is no need here to construct an encoded-word,
and so this is not done. Compare this with
mb_encode_mimeheader("tést:tést", "UTF-8", "Q")
which needs to construct an encoded-word (due to the non ASCII
characters), and therefore evaluates to
=?UTF-8?Q?t=C3=A9st=3At=C3=A9st?=
Previous Comments:
------------------------------------------------------------------------
[2018-02-18 20:12:01] azurit at pobox dot sk
Description:
------------
Function mb_encode_mimeheader is NOT quoting a colon character (:), which is against RFC, see:
https://tools.ietf.org/html/rfc5322#section-3.2.3
See also this very same Thunderbird bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1438590
Test script:
---------------
<?php
mb_internal_encoding('UTF-8');
echo mb_encode_mimeheader("test:test", "UTF-8", "Q");
?>
Expected result:
----------------
test=3atest
Actual result:
--------------
test:test
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75979&edit=1