Escape all the property names in JSONWriter

RESOLVED FIXED in Firefox 62

Status

()

defect
P1
normal
RESOLVED FIXED
Last year
Last year

People

(Reporter: Dexter, Assigned: Dexter)

Tracking

Trunk
mozilla62
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(1 attachment)

As of now, JSONWriter only seems to properly escape the name of the properties for scalars. As a consequence, the following example would fail to be escaped and will produce an invalid JSON:

> { "some\path": 12 }

The fix should be trivial: using in |PropertyNameAndColon| [2] in [1].

[1] - https://searchfox.org/mozilla-central/rev/c621276fbdd9591f52009042d959b9e19b66d49f/mfbt/JSONWriter.h#315-319
[2] - https://searchfox.org/mozilla-central/rev/c621276fbdd9591f52009042d959b9e19b66d49f/mfbt/JSONWriter.h#271
Assignee

Updated

Last year
Assignee: nobody → alessio.placitelli
Blocks: 1461965
Priority: -- → P1
Comment hidden (mozreview-request)

Comment 2

Last year
mozreview-review
Comment on attachment 8984535 [details]
Bug 1467759 - Escape all the property names in JSONWriter.

https://reviewboard.mozilla.org/r/250412/#review256984

Thanks!
Attachment #8984535 - Flags: review?(nfroyd) → review+

Comment 3

Last year
Pushed by alessio.placitelli@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/faeec6285083
Escape all the property names in JSONWriter. r=froydnj

Comment 4

Last year
bugherder
https://hg.mozilla.org/mozilla-central/rev/faeec6285083
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.