Opened 10 years ago

Closed 10 years ago

Last modified 10 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@… 10 years ago.
mythtv.2.patch (647 bytes) - added by dev-team@… 10 years ago.
updated patch

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by dev-team@…

Attachment: mythtv.patch added

Changed 10 years ago by dev-team@…

Attachment: mythtv.2.patch added

updated patch

comment:1 Changed 10 years ago by Bill Meek <keemllib@…>

Refs. #11627

comment:2 Changed 10 years ago by dblain

Owner: set to dblain
Status: newaccepted

comment:3 Changed 10 years ago by dev-team <dev-team@…>

Resolution: fixed
Status: acceptedclosed

In f8925b3c0da90ff0e07fae6adde78e772d085a52/mythtv:

Fixes #11905 - HttpRequest? parsing fails on parameters containing encoded & character

comment:4 Changed 10 years ago by dev-team <dev-team@…>

In 6ecb83e8454e54eb7bf521c8b3eb111e99e35e4a/mythtv:

Fixes #11905 - HttpRequest? parsing fails on parameters containing encoded & character

Note: See TracTickets for help on using tickets.