Closed Bug 2048944 Opened 1 month ago Closed 1 month ago

Cannot detect ISO-2022-JP

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox152 --- wontfix
firefox153 --- fixed
firefox154 --- fixed

People

(Reporter: emk, Assigned: hsivonen)

References

()

Details

(Keywords: japan, regression)

Attachments

(2 files)

I know we deliberately disabled auto-detection, but Chrome detects ISO-2022-JP on this page.
The difference may cause script injection (think if the MIME type is text/html and \x1b$B<script>alert()</script>\x1b(B exists on this page.

It would have been nice if https://github.com/mozilla/standards-positions/issues/1199 had emphasized that Chrome was retaining autodetection for plain text.

I've attached a patch that tries to restore autodetection support for plain text. I have a feeling that I might be missing some cases. This doesn't have tests, yet.

Flags: needinfo?(hsivonen)
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED

:hsivonen hi! can you set a priority/severity for this?

Flags: needinfo?(hsivonen)

S3, because despite the lack of workaround, the impact is relatively limited: Mostly archives of mailing lists served over HTTP.

Severity: -- → S3
Flags: needinfo?(hsivonen)
Priority: -- → P3
Attachment #9599697 - Attachment description: WIP: Bug 2048944 - Restore ISO-2022-JP detection for plain text. → Bug 2048944 - Restore ISO-2022-JP detection for plain text.
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

The patch landed in nightly and beta is affected.
:hsivonen, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(hsivonen)

Given that Henri isn't available to do so, can you please nominate this for Beta uplift?

Flags: needinfo?(VYV03354)
Attachment #9606244 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Users cannot read plain text files encoded in ISO-2022-JP.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Only partially restores previous code paths.
  • String changes made/needed?: No
  • Is Android affected?: yes
Flags: needinfo?(VYV03354)
Flags: needinfo?(hsivonen)
Attachment #9606244 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: