View Issue Details

IDProjectCategoryView StatusLast Update
0005496libmicrohttpdotherpublic2021-09-02 17:54
Reportercandrews Assigned ToChristian Grothoff  
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 18:20

manager   ~0013386

Fixed in 11eb7a48..79a8955b

Christian Grothoff

2021-09-02 17:54

manager   ~0018179

Fix committed to master branch.

Related Changesets

libmicrohttpd: master 79a8955b

2018-12-05 19:20

Christian Grothoff


Details Diff
fix 0005496: Affected Issues
0005496
mod - ChangeLog Diff File
mod - src/microhttpd/connection.c Diff File

Issue History

Date Modified Username Field Change
2018-12-05 15:39 candrews New Issue
2018-12-05 18:19 Christian Grothoff Assigned To => Christian Grothoff
2018-12-05 18:19 Christian Grothoff Status new => assigned
2018-12-05 18:20 Christian Grothoff Status assigned => resolved
2018-12-05 18:20 Christian Grothoff Resolution open => fixed
2018-12-05 18:20 Christian Grothoff Fixed in Version => 0.9.62
2018-12-05 18:20 Christian Grothoff Note Added: 0013386
2018-12-05 18:20 Christian Grothoff Target Version => 0.9.62
2018-12-08 23:10 Christian Grothoff Status resolved => closed
2021-09-02 17:54 Christian Grothoff Changeset attached => libmicrohttpd master 79a8955b
2021-09-02 17:54 Christian Grothoff Note Added: 0018179