decodeURIComponent should throw URIError for '%ED%A0%80'

RESOLVED FIXED

Status

--
minor
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: masa141421356, Unassigned)

Tracking

(Blocks: 1 bug)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

8 years ago
Rhino seems to have same problem of bug 660612.
(Reporter)

Updated

8 years ago
Severity: normal → minor
OS: Windows XP → All
Hardware: x86 → All
(Reporter)

Updated

7 years ago
Blocks: 489326

Comment 1

7 years ago
Created attachment 575637 [details] [diff] [review]
Patch v1

Ported from the final patch for bug #660612 for Spidermonkey. Also throws URIError on overlong UTF-8 sequences which should fix #660798. 

I'm not sure if there's anything else we need to port from Spidermonkey #511859 for recognizing overlong sequences.

Still needs update of tests (remove regress-172699.js, add regress-511859.js).

Comment 2

7 years ago
Created attachment 575652 [details] [diff] [review]
Improved patch

Make sure we always throw URIErrors in decode and encode functions, and remove obsolete test case.
Attachment #575637 - Attachment is obsolete: true

Comment 4

7 years ago
Committed and pushed to master:

https://github.com/mozilla/rhino/commit/879940b9f51be52c8a08f5e94ee9c81f590e2b07
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.