Closed Bug 1180418 Opened 9 years ago Closed 9 years ago

Search terms aren't escaped

Categories

(Firefox for iOS :: Home screen, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: rnewman, Assigned: karim)

Details

Attachments

(1 file)

Type "AT&T". Search. Observe that the string appears literally in the url, and thus the search is for "AT".
tracking-fxios: --- → +
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
Assignee: bnicholson → kbenhmida
Comment on attachment 8630615 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/682

It looks like this still allows other characters that should be encoded, such as "+" and "?".

Rather than starting with all valid query characters and blacklisting specific ones, I'd create a whitelist from the ground up that includes only allowable characters.

According to Wikipedia [1]: Letters (A–Z and a–z), numbers (0–9) and the characters '*','-','.' and '_' are left as-is. All other characters are encoded.

So how about we create a custom character set with just those characters?

[1] https://en.wikipedia.org/wiki/Query_string#URL_encoding
Attachment #8630615 - Flags: review?(bnicholson) → feedback+
Attachment #8630615 - Flags: feedback+ → review?(bnicholson)
Comment on attachment 8630615 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/682

r=me with hardcoded string extracted.
Attachment #8630615 - Flags: review?(bnicholson) → review+
Comment on attachment 8630615 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/682

Harcoded string extracted. r=bnicholson
Commit 2634ae35ebfef39e7f45abb81ac087b24f02d066
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: