| Summary: | Gemini Web does not decode the WEB URL query string | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Gemini.Web | Reporter: | Violeta Georgieva <milesg78> | ||||||
| Component: | unknown | Assignee: | Glyn Normington <glyn.normington> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | glyn.normington, hargrave | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 2.0.0.RC1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| URL: | https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1736 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Violeta Georgieva
Change is committed, tested and pushed. Commit ID: 5d271faa4ae2e5a5e6934d3d0c447593d56a6d37 It seems this fix does not properly handle decoding spaces encoded as '+' [1]. webbundle:file:<file-name>?Bundle-SymbolicName=test+test has a valid query string and the value of "Bundle-SymbolicName" must be decoded as "test test". [1] http://en.wikipedia.org/wiki/Query_string#URL_encoding Created attachment 199861 [details]
Patch proposal
Could you please review the patch.
Regards
Violeta
I think the fix is wrong. You are decoding the whole string and then parsing it. You need to parse it and then decode each part (key, value). The query string: foo=ack%26barf&bar=nack needs to be parsed into foo = ack%26barf bar = nack and then decoded into foo = ack&barf bar = nack If you decode the whole string first you get: foo=ack&barf&bar=nack which will be parsed quite differently. Your function "parseQueryString" needs to be decoding each part after it is parsed out of the query string. Created attachment 199875 [details]
Patch proposal
I agree.
I reworked the patch. Could you please comment it?
Regards
Violeta
Comment on attachment 199875 [details]
Patch proposal
This patch look much better!
(In reply to comment #6) > Comment on attachment 199875 [details] > Patch proposal > > This patch look much better! Thanks BJ! Violeta is out of the office, so I'll be applying the patch. Targeting 2.0.0.RC1 as this is highly desirable for 2.0. Fixed in commit 1513e16cec1708ed428382160c44548f35131491. |