Closed
Bug 989275
Opened 12 years ago
Closed 12 years ago
Site tries to decodeURIComponent(unescape(uri)), which throws if the URI contained an escaped '%'
Categories
(Tech Evangelism Graveyard :: English US, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: jmichae3, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140314220517
Steps to reproduce:
http://jesusnjim.com/pc-repair/speed-up/maximize-cpu-performance-disable-core-parking.html
used method="get" in form and did submit. click "create bookmarkable URL" to do the submit.
do ctrl-shift-i
click console. refresh/F5 if you have to.
Actual results:
debugger gives error message "URIError: malformed URI sequence geturlargs.js:104"
ff throws an error at its own generated URL.
Expected results:
no error.
Comment 1•12 years ago
|
||
Reproduced with 2014-04-02-03-02-01-mozilla-central-firefox-31.0a1.en-US.linux-x86_64. Core::General, because the report is about the submission disagreeing with the function, although I suspect the function is right.
QA Whiteboard: [bugday-20140407]
Component: Untriaged → General
OS: Windows 7 → All
Product: Firefox → Core
See Also: → 807719
Summary: % in method=get submitted form causes malformed URI error in debugger → % in method=get submitted form causes malformed URI error from decodeURIComponent (shown in debugger)
Comment 2•12 years ago
|
||
The relevant URI is http://jesusnjim.com/pc-repair/speed-up/maximize-cpu-performance-disable-core-parking.html?imaxtemp=66.8&temptype=C&imarginpct=85%25
The page then calls getURLargs(), which takes document.location.toString(), looks at the part after '?', splits it on '&', splits each element of the resulting array on '=', and then passes the RHS one at a time to URIToString(). So in this case it's passing "85%25".
Here's what URIToString does:
s=decodeURIComponent(unescape(s))
which is, of course buggy. A simple console session:
decodeURIComponent("85%25")
"85%"
unescape("85%25")
"85%"
decodeURIComponent(unescape("85%25"))
URIError: malformed URI sequence
So this is just a site bug with trying to unescape twice instead of once, not a problem with either form submission or decodeURIComponent...
Note that other browsers throw the same exception, for the same reason.
Over to evangelism, but since it's broken in all browsers maybe just marking invalid is better....
Assignee: nobody → english-us
Status: UNCONFIRMED → NEW
Component: General → English US
Ever confirmed: true
Product: Core → Tech Evangelism
Summary: % in method=get submitted form causes malformed URI error from decodeURIComponent (shown in debugger) → Site tries to decodeURIComponent(unescape(uri)), which throws of the URI contained an escaped '%'
Version: 28 Branch → Trunk
Updated•12 years ago
|
Summary: Site tries to decodeURIComponent(unescape(uri)), which throws of the URI contained an escaped '%' → Site tries to decodeURIComponent(unescape(uri)), which throws if the URI contained an escaped '%'
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Updated•11 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•