Opened 13 years ago
Closed 13 years ago
Last modified 13 years ago
#11905 closed Patch - Bug Fix (fixed)
HttpRequest parsing fails on parameters containing encoded & character
| Reported by: | Owned by: | dblain | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.27.1 |
| Component: | MythTV - General | Version: | 0.27-fixes |
| Severity: | medium | Keywords: | httprequest services api |
| Cc: | Ticket locked: | no |
Description
Using the services api, while attempting to get the artwork for a recording containing a & in the title the backend would always fail to serve the artwork. The sample http get request was http://master:6544/Content/GetImageFile?StorageGroup=Coverart&FileName=Eastbound+%26+Down+Season+4_coverart.jpg
the current httprequest.cpp first decodes the entire substring after "?" and therefore converts '%26' to '&' then it passes it to the GetParameters method which now reads erroneously an extra parameter. GetParameters decodes each parameter name/value pair with fromPercentEncoding().
Attached is a patch that simply removes the decoding of the entire substring and let GetParameter do the decoding properly.
Attachments (2)
Change History (6)
by , 13 years ago
| Attachment: | mythtv.patch added |
|---|
by , 13 years ago
| Attachment: | mythtv.2.patch added |
|---|
comment:2 by , 13 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |

updated patch