Project

General

Profile

Actions

Bug #20232

closed

wrong encoded email header (t3lib_div::encodeHeader)

Added by Ivan Dharma Kartolo over 15 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2009-03-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

the function t3lib_div::quoted_printable encodes all non ASCII character in their hex value correctly. But for email subject there must be no question mark (?) ASCII 63, because question mark is used to separate between charset, encoding and the encoded text [1].

The attached patch search for question mark, and replace with it's hex value.

[1] http://tools.ietf.org/html/rfc1342

send an email (with direct_mail), which having question mark in the subject.
See http://bugs.typo3.org/view.php?id=10678

Patch is made against 4.2.6
(issue imported from #M10769)


Files

patch-encodeHeader.diff (411 Bytes) patch-encodeHeader.diff Administrator Admin, 2009-03-23 23:18
10769-trunk.diff (912 Bytes) 10769-trunk.diff Administrator Admin, 2009-07-19 15:29
10769.diff (912 Bytes) 10769.diff Administrator Admin, 2009-07-19 15:29
10769-v2.diff (935 Bytes) 10769-v2.diff Administrator Admin, 2009-07-20 23:41
0010769_test.patch (1.32 KB) 0010769_test.patch Administrator Admin, 2009-08-02 01:45
0010769_v3.patch (913 Bytes) 0010769_v3.patch Administrator Admin, 2009-08-02 10:07

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #21668: Wrong mail encodingClosed2009-11-24

Actions
Actions #1

Updated by Ivan Dharma Kartolo almost 15 years ago

new patch files added.
10769-trunk.diff is made against the trunk of TYPO3 4.x.
10769.diff is made against the branch of TYPO3 4.2.x

Actions #2

Updated by Oliver Hader almost 15 years ago

Thanks for your patch!
You could just use '=3F' for the question mark instead of the sprinftf() thingy.
Would you like to post your patch to the TYPO3 Core Mailing List (without the patch-comment, but the hint to that RFC)?
Thanks in advance!

Actions #3

Updated by Ivan Dharma Kartolo almost 15 years ago

added Version 2 of the patch which uses the existing str_replace.

Actions #4

Updated by Oliver Hader almost 15 years ago

Committed to SVN Trunk (rev. 5749)
Committed to TYPO3_4-2 (rev. 5750)

Committed Unit Test to SVN Trunk (rev. 5751)

Actions

Also available in: Atom PDF