Closed Bug 1364953 Opened 7 years ago Closed 7 years ago

NUL (U+0000) crashes JSON Viewer

Categories

(DevTools :: JSON Viewer, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Load data:application/json,%00

The JSON Viewer crashes. The error says "TypeError: headers is null", but that's because the NUL terminated the source of the document!

If you fix the JS problem, load data:application/json,AAAA%00BBBB and click Raw data, you only see AAAA. The rest of the string is not there!

You can even load data:application/json,[1,2,3]%00BBBB which displays the array [1,2,3] as if the input was valid JSON.
Depends on: 1367894
Depends on: 1368605
Fixed in bug 1367894, test added in bug 1368605.
Assignee: nobody → oriol-bugzilla
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.