Closed
Bug 1268263
Opened 9 years ago
Closed 9 years ago
URLs from firefox:// scheme are double unescaped
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
4.0
People
(Reporter: jhugman, Assigned: jhugman)
Details
Attachments
(1 file)
This came out of https://bugzilla.mozilla.org/show_bug.cgi?id=1266091
We try to open a google search for "cheese platter". This is correctly encoded as:
firefox://open-url?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dcheese%2520platter
by the open-in demo project.
We receive this in application(application:, openURL:, sourceApplication:, annotation:):
firefox://open-url?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dcheese%2520platter
Which we parse with NSURLComponents and take the url parameter we have:
https://www.google.com/search?q=cheese%20platter
Then we double decode it with url.unescape, which results in the following invalid and ignored URL:
https://www.google.com/search?q=cheese platter
The fix here is to not url.unescape() - NSURLComponents has already done that.
Comment 1•9 years ago
|
||
I'm marking this as blocking 4.0 because this is a one line and low risk fix.
Severity: normal → blocker
tracking-fxios:
--- → 4.0+
Updated•9 years ago
|
Whiteboard: [needsuplift]
Assignee | ||
Comment 2•9 years ago
|
||
One line fix.
I wanted to fix the url method argument being redeclared as String? but wanted to keep this minimal.
https://github.com/mozilla/firefox-ios/commit/c58b52970b15434a2e1c567bf1dcfcb7e83c68e6#diff-19fd1a6fe4b2f78eb457726f366733e0
Attachment #8746257 -
Flags: review?(sarentz)
Assignee | ||
Updated•9 years ago
|
Summary: URLs from firefox:// scheme are double escaped → URLs from firefox:// scheme are double unescaped
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jhugman
Status: NEW → ASSIGNED
Updated•9 years ago
|
Attachment #8746257 -
Flags: review?(sarentz) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Merged and closed.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
status-fxios-v4.0:
--- → fixed
status-fxios-v5.0:
--- → fixed
Whiteboard: [needsuplift]
Target Milestone: --- → 4.0
You need to log in
before you can comment on or make changes to this bug.
Description
•