diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-29 14:30:24 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-29 14:30:24 +0000 |
commit | a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57 (patch) | |
tree | 9df45decf2d7d940ff19641adea50fe7122805f7 /netwerk/protocol | |
parent | 86b184b957ea2ce31e5ffc376e90cbc537963367 (diff) | |
parent | 2ee2ca7dfb0913eef79708dc4100f87b9557e128 (diff) | |
download | UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar.gz UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar.lz UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.tar.xz UXP-a1ca8ca9bd1f4442dcbe613efa04f37a2c7b9f57.zip |
Merge branch 'redwood' into release
Diffstat (limited to 'netwerk/protocol')
-rw-r--r-- | netwerk/protocol/http/HttpBaseChannel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index a53022f71..bf8e17537 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -562,6 +562,12 @@ NS_IMETHODIMP HttpBaseChannel::SetContentDispositionFilename(const nsAString& aContentDispositionFilename) { mContentDispositionFilename = new nsString(aContentDispositionFilename); + + // For safety reasons ensure the filename doesn't contain null characters and + // replace them with underscores. We may later pass the extension to system + // MIME APIs that expect null terminated strings. + mContentDispositionFilename->ReplaceChar(char16_t(0), '_'); + return NS_OK; } |