Closed Bug 1710581 Opened 4 years ago Closed 4 years ago

Fix test_createRFC822Message.js to make sure non-UTF-8 binary strings are transported correctly

Categories

(MailNews Core :: General, enhancement)

enhancement

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
90 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: tom, Assigned: tom)

Details

Attachments

(1 file, 1 obsolete file)

From bug 1710043 comment #12:

test_createRFC822Message.js needs an overhaul, IOUtils.readUTF8 doesn't appear to be correct for reading back arbitrary data.

Can you send a link to IOUtils.readUTF8 you're referring to? I changed to IOUtils.read a few days ago

https://searchfox.org/comm-central/rev/9b70387c49576c721e8a1d7a1945aa18782b6d31/mailnews/compose/test/unit/test_createRFC822Message.js#20

This one didn't get changed, and the message body you're transporting should contain some arbitrary binary data to make sure there is no UTF-8 assumption anywhere in the code path.

Attached patch 1710581.patch (obsolete) — Splinter Review
Assignee: nobody → tom
Status: NEW → ASSIGNED
Attachment #9221305 - Flags: review?(remotenonsense)

Comment on attachment 9221305 [details] [diff] [review]
1710581.patch

Looks good, thanks. Please add a timestamp to the patch. I often use hg export tip > 1710581.patch to generate one.

Attachment #9221305 - Flags: review?(remotenonsense) → review+
Attached patch 1710581.patchSplinter Review

Thanks for the review, now with timestamp.

Attachment #9221305 - Attachment is obsolete: true
Attachment #9221516 - Flags: review+
Target Milestone: --- → 90 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e1946904f4d2
enhance test_createRFC822Message.js with some binary data. r=rnons

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/2441ae8a4ce1 followup lint fix. rs=eslint DONTBUILD

Comment on attachment 9221516 [details] [diff] [review]
1710581.patch

[Approval Request Comment]
Test-only code, low risk.
This bug updates test code with respect to the changes in bug 1710043 and should be uplifted at the same time.

Attachment #9221516 - Flags: approval-comm-beta?

This bug updates test code with respect to the changes in bug 1710043 and should be uplifted at the same time.

Thanks for requesting the "uplift", but it's really not necessary. Bug 1710043 is rather important, HTML "downgrade" to plain text can have some surprising results. Do you still want it on the beta or should we clear the request?

Comment on attachment 9221516 [details] [diff] [review]
1710581.patch

[Triage Comment]
Sorry, we missed doing the next 89 beta, so this will appear in beta 90

Attachment #9221516 - Flags: approval-comm-beta? → approval-comm-beta-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: