Closed Bug 1583869 Opened 6 years ago Closed 6 years ago

NoSniff breaks JSON Viewer for content types other than application/json and application/manifest+json

Categories

(DevTools :: JSON Viewer, defect, P1)

71 Branch
defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox67 unaffected, firefox68 unaffected, firefox69 unaffected, firefox70+ disabled, firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 + disabled
firefox71 --- fixed

People

(Reporter: Oriol, Assigned: sstreich)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

The JSON Viewer loads when the content type is application/json or any application/*+json.

However, bug 1578991 only handled application/json, application/manifest+json and text/json.

Therefore, with NoSniff, the JSON viewer doesn't load for content types like application/vnd.api+json, application/hal+json or application/ld+json.

Testcase: run this file in a server with php:

<?php
header("Content-Type: application/vnd.api+json");
header("x-content-type-options: nosniff");
echo '[1,2,3]';
?>

Expected: the JSON Viewer displays the contents.
Actual: Firefox offers to download the file.

Assignee: nobody → sstreich

@Oriol, thanks for clarification!
Honza

Status: NEW → ASSIGNED
Keywords: checkin-needed

Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/04f75de35ca7
Call Sniffers for application/* mime Types r=ckerschb

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71

We don't need this in 70 now, right? I think this was just disabled in bug 1585055 (?)

Flags: needinfo?(sstreich)

I'll just leave this affected for now and track it till I hear back.

Changing the priority to p1 as the bug is tracked by a release manager for the current beta.
See What Do You Triage for more information

Priority: P3 → P1

Hey! Yes once bug 1585055 is uplifted, ff70 is unaffected of this.

Flags: needinfo?(sstreich)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: