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: dev-team@… 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)

mythtv.patch (1.1 KB ) - added by dev-team@… 13 years ago.
mythtv.2.patch (647 bytes ) - added by dev-team@… 13 years ago.
updated patch

Download all attachments as: .zip

Change History (6)

by dev-team@…, 13 years ago

Attachment: mythtv.patch added

by dev-team@…, 13 years ago

Attachment: mythtv.2.patch added

updated patch

comment:1 by Bill Meek <keemllib@…>, 13 years ago

Refs. #11627

comment:2 by dblain, 13 years ago

Owner: set to dblain
Status: newaccepted

comment:3 by dev-team <dev-team@…>, 13 years ago

Resolution: fixed
Status: acceptedclosed

In f8925b3c0da90ff0e07fae6adde78e772d085a52/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:4 by dev-team <dev-team@…>, 13 years ago

In 6ecb83e8454e54eb7bf521c8b3eb111e99e35e4a/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available
Note: See TracTickets for help on using tickets.