Opened 8 years ago

Closed 5 years ago

#11627 closed Bug Report - General (Fixed)

Service API GetImageFile not handling '&' in file names

Reported by: r.d.vaughan@… Owned by: cpinkham
Priority: minor Milestone: 0.27
Component: MythTV - Services API - Backend Version: 0.26-fixes
Severity: medium Keywords: Service API GetImageFile
Cc: Ticket locked: no


Service API GetImageFile? does not handle files with an embedded '&' even when escaped (e.g. "Law%20%26%20Order"). This presents an issue when the files are related with MythVideo? records. Alternate Service API's associated with Recorded Artwork do not support screenshots and do not necessarily have records at all especially when entries in MythVideo? were collected before Recorded Artwork metadata was supported.

I am currently running a fully updated version of v0.26+fixes. I believe this problem is in every version that the Service API GetImageFile? exists including master. The following information was extracted from a developer's IRC channel log, where bill6502 verified that the issue exists and made these relevant comments:

<bill6502> IReboot: The proper escape for & is, in fact %26, but [ec50629] breaks it by doing fromPercentEncoding before it reaches: <bill6502> httprequest.cpp:904 (GetParameters?) - sParams: 'StorageGroup?=fanart&FileName?=Law%20%26%20Order:%20Special%20Victims%20Unit%20Season%201_fanart.jpg' <bill6502> so the %26 is replaced with & and whatever follows looks like another parameter. <bill6502> looks like the [] don't work, the commit is here: reverting line 1027 fix the problem, but would likely bring back whatever it fixed.

I labelled the component as the default "MythTV-General" as there is no obvious category for Service API.

Change History (5)

comment:1 Changed 8 years ago by r.d.vaughan@…

Sorry, forgot to mention this related issue. There are a number of TV shows with slashes in their names. I have no idea how this could be handled. (e.g. "Inside 9/11"). As I can't create such a file name I could not check if the escape code "%2F" would have worked. See:

Cannot be verified if it works or not:;FileName=Inside%209%2F11_test.jpg

comment:2 Changed 8 years ago by cpinkham

Owner: set to cpinkham
Status: newassigned

comment:3 Changed 8 years ago by cpinkham

Component: MythTV - GeneralMythTV - Services API - Backend

comment:4 Changed 5 years ago by Bill Meek

Status: assignedinfoneeded

Percent encoding works OK in 0.28-pre.

Is this still a problem in 0.27?

comment:5 Changed 5 years ago by Bill Meek

Milestone: unknown0.27
Resolution: Fixed
Status: infoneededclosed

No response, closing. Before reopening, try:

FileName=Law %26 Order: Special Victims Unit Season 9_coverart.jpg

as a filename. It works in fixes/0.27.6 OK. I don't know which commit fixed it.

Note: See TracTickets for help on using tickets.