@dmichelsen, @mgrouch, @npostavs: I noticed LibXml2 has a similar bug: https://bugzilla.gnome.org/show_bug.cgi?id=753880 Given the similarities, do you suggest that this bug should be resolved in LibXml2 rather than here?
Addtional observations: - LibXml2 internally calls stat() in an attempt to obtain information about the file (see method libxml2::xmlIO.c::xmlCheckFilename). - LibXml2 does attempt to sanitize the pathname, but only to an extent to determine if it is a valid network path or not, and to clean URI encoding problems (see method libxml2::uri.c::xmlURIUnescapeString) Analysis: - LibXml2 does not handle name encoding problems. This shows up in passing filenames with escaped quotes. File names such as "foo\'s.nfo"...
Addtional observations: - LibXml2 internally calls stat() in an attempt to obtain information about the file (see method libxml2::xmlIO.c::xmlCheckFilename). - LibXml2 does attempt to sanitize the pathname, but only to an extent to determine if it is a valid network path or not, and to clean URI encoding problems (see method libxml2::uri.c::xmlURIUnescapeString) Analysis: - LibXml2 does not handle name encoding problems. This shows up in passing filenames with escaped quotes. File names such as "foo\'s.nfo"...
Addtional observations: - LibXml2 internally calls stat() in an attempt to obtain information about the file (see method libxml2::xmlIO.c::xmlCheckFilename). - LibXml2 does attempt to sanitize the pathname, but only to an extent to determine if it is a valid network path or not, and to clean URI encoding problems (see method libxml2::uri.c::xmlURIUnescapeString) Analysis: - LibXml2 does not handle name encoding problems. This shows up in passing filenames with escaped quotes. File names such as "foo\\'s.nfo"...
Addtional observations: - LibXml2 internally calls stat() in an attempt to obtain information about the file (see method libxml2::xmlIO.c::xmlCheckFilename). - LibXml2 does attempt to sanitize the pathname, but only to an extent to determine if it is a valid network path or not, and to clean URI encoding problems (see method libxml2::uri.c::xmlURIUnescapeString) Analysis: - LibXml2 does not handle name encoding problems. This shows up in passing filenames with escaped quotes. File names such as "foo\'s.nfo"...
Initial observation: - LibXml2 does not like the filename being passed to it (xml_select.c, line 663). Trace: - xml_select.c,663::do_file() Observations: - Passing string "/tmp/foo\'s.nfo" gets escaped to "/tmp/foo\\'s.info" - Passing string "/tmp/foo's.nfo" does not get escaped Next step: - Researching into how to get a debug build of LibXml2 - Debug into why LibXml2 does not like it
Initial observation: - LibXml2 does not like the filename being passed to it (xml_select.c, line 663). Trace: - xml_select.c,663::do_file() Observations: - Passing string "/tmp/foo\'s.nfo" gets escaped to "/tmp/foo\'s.info" - Passing string "/tmp/foo's.nfo" does not get escaped Next step: - Researching into how to get a debug build of LibXml2 - Debug into why LibXml2 does not like it