View Issue Details

IDProjectCategoryView StatusLast Update
0005496libmicrohttpdotherpublic2021-09-02 15:54
Reportercandrews Assigned ToChristian Grothoff Due Date
PriorityurgentSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformGNU/LinuxOSFedoraOS Version29
Product Version0.9.61 
Target Version0.9.62Fixed in Version0.9.62 
Summary0005496: Regression: Requested URI is being escaped twice
DescriptionThis issue was discovered by Kodi: https://github.com/xbmc/xbmc/issues/14991

----
libmicrohttpd is now unescaping the requested URI twice with 0.9.61 ( https://gnunet.org/git/libmicrohttpd.git/tree/src/microhttpd/connection.c?id=7b92bb1cdebfaefd0fe778f63542ce5d465daa94#n2282 and again https://gnunet.org/git/libmicrohttpd.git/tree/src/microhttpd/connection.c?id=7b92bb1cdebfaefd0fe778f63542ce5d465daa94#n2311 ), when in previous versions they only unescaped the URI once ( https://gnunet.org/git/libmicrohttpd.git/tree/src/microhttpd/connection.c?id=8466a08d3588608f018722d6a176ced2e0c2a539#n2303 ). This additional unescape results in libmicrohttpd 0.9.61 not being able to find the requested resource, which should still be in an escaped form.

Removing the second unescape from 0.9.61 with http://ix.io/1qKG resolves the issue.

Requested URL:

http://192.168.0.20:8080/image/image%3A%2F%2Fnfs%253a%252f%252f192.168.0.3%252fmnt%252fshare%252fmedia%252fVideo%252fMoviesSD%252f2012%2520(2009)%255bDVDRip%255d-poster.jpg%2F

With 0.9.61:

input line:

GET /image/image%3A%2F%2Fnfs%253a%252f%252f192.168.0.3%252fmnt%252fshare%252fmedia%252fVideo%252fMoviesSD%252f2012%2520(2009)%255bDVDRip%255d-poster.jpg%2F HTTP/1.1

parsed uri:

/image/image://nfs://192.168.0.3/mnt/share/media/Video/MoviesSD/2012 (2009)[DVDRip]-poster.jpg/

Result: Failure (404)

With 0.9.55 (or 0.9.61 + http://ix.io/1qKG):

input line:

GET /image/image%3A%2F%2Fnfs%253a%252f%252f192.168.0.3%252fmnt%252fshare%252fmedia%252fVideo%252fMoviesSD%252f2012%2520(2009)%255bDVDRip%255d-poster.jpg%2F HTTP/1.1

parsed uri:

/image/image://nfs%3a%2f%2f192.168.0.3%2fmnt%2fshare%2fmedia%2fVideo%2fMoviesSD%2f2012%20(2009)%5bDVDRip%5d-poster.jpg/

Result: Success (200)
Additional InformationThis is a regression introduced in 0.9.61
TagsNo tags attached.

Activities

Christian Grothoff

2018-12-05 17:20

manager   ~0013386

Fixed in 11eb7a48..79a8955b

Christian Grothoff

2021-09-02 15:54

manager   ~0018179

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2018-12-05 14:39candrewsNew Issue
2018-12-05 17:19Christian GrothoffAssigned To => Christian Grothoff
2018-12-05 17:19Christian GrothoffStatusnew => assigned
2018-12-05 17:20Christian GrothoffStatusassigned => resolved
2018-12-05 17:20Christian GrothoffResolutionopen => fixed
2018-12-05 17:20Christian GrothoffFixed in Version => 0.9.62
2018-12-05 17:20Christian GrothoffNote Added: 0013386
2018-12-05 17:20Christian GrothoffTarget Version => 0.9.62
2018-12-08 22:10Christian GrothoffStatusresolved => closed
2021-09-02 15:54Christian Grothoff
2021-09-02 15:54Christian GrothoffNote Added: 0018179