Closed
Bug 577060
Opened 14 years ago
Closed 13 years ago
JSON.parse should allow only numbers conforming to NFA spec at json.org
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: wesongathedeveloper, Assigned: wesongathedeveloper)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review |
Only { x | abs(x) < 1 } can have a leading 0
At most 1 leading zero is allowed
there MUST be at least one digit after the decimal point
ONLY a digit or a minus sign can start a number
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: general → wesongathedeveloper
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #456142 -
Attachment is obsolete: true
Attachment #457224 -
Flags: review?(sayrer)
Comment 3•14 years ago
|
||
I will test perf on this before reviewing.
Comment 4•14 years ago
|
||
The JSONParserState additions aren't commented, according with the current entries. That's changing in bug 564621, whose patch is finished but which can't land quite yet for yak-shaving reasons. However, the JSONParserState documentation can be split out of it, so I'm going to do that now so you can make additions here without having them either undocumented or anomalously documented. The rest of those changes should (fingers crossed) have minimal intersection with the patch here.
Comment 5•14 years ago
|
||
Pushed those docs changes, so you should be able to update the patch with docs for the JSONParserState changes now:
http://hg.mozilla.org/tracemonkey/rev/db4607b00594
You may fire when ready, Gridley.
Comment 6•14 years ago
|
||
The parser rewrite fixes this. (And sigh, yet another patch that got left dangling. :-( )
Depends on: 589664
Comment 7•13 years ago
|
||
Fixed by the parser rewrite in bug 589664.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 8•13 years ago
|
||
For the record, rejecting leading zeroes broke someone's intranet application. Worth knowing, perhaps, although I don't think we should do anything about it (nor should we have done differently at the time if we'd known):
http://whereswalden.com/2011/06/06/i-feel-the-need-the-need-for-json-parsing-correctness-and-speed/#comment-153900
They targeted Firefox 3 and 4 only, hence why no other browser complained to make them fix.
Updated•13 years ago
|
Attachment #457224 -
Flags: review?(sayrer)
You need to log in
before you can comment on or make changes to this bug.
Description
•