]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
webui, htsbuf: Content-Disposition escape chars are not correct.
authorThomas Warburton <45946278+oopscentral@users.noreply.github.com>
Mon, 17 Dec 2018 14:23:18 +0000 (14:23 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 19 Dec 2018 14:10:40 +0000 (15:10 +0100)
commitcc3ef221c9f84e682d8cb4042684140482d05525
tree3650ec4321f2ef4dce6f059df992bfd046b56013
parenta1a94dce3a026d588b5fd946a9451284930c5b26
webui, htsbuf: Content-Disposition escape chars are not correct.

When attempting to download a recording with a comma Google Chrome will
fail with ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION. This is
because the comma ',' in the filename*=UTF-8'' field was not escaped.

This commit implements the defined list of non-escape characters from
RFC8187 based on htsbuf_append_and_escape_url.

The same problem occurs in issue #2086. Fixed in 2fdfe4836 "webui: fix the
attachment; filename encoding, fixes #2086" and broken again in ab9fc249a
"fix htsbuf_append_and_escape_url() - don't escape more allowed characters,
fixes #3721".

Only tested in release/4.2.

https://bugs.chromium.org/p/chromium/issues/detail?id=454165
src/htsbuf.c
src/htsbuf.h
src/webui/webui.c