]> 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:09:59 +0000 (15:09 +0100)
commita11733fed0f74da5cb309aa624a7039918b21126
treedb34be42606bc028da717df01bbed933aa32f68e
parentfaa5176b250572fb6e35f4ce95919b4800b94d3b
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