Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
CVE-2019-16216: Fix MIME type validation.
* Whitelist a small number of image/ types to be served as non-attachments. * Serve the file using the type that we validated rather than relying on an independent guess to match. This issue can lead to a stored XSS security vulnerability for older browsers that don't support Content-Security-Policy. It primarily affects servers using Zulip's local file uploads backend for servers running Ubuntu 16.04 Xenial or newer; the legacy local file upload backend for (now EOL) Ubuntu 14.04 Trusty was not affected and it has limited impact for the S3 upload backend (which uses an unprivileged S3 bucket domain to serve files). This was fixed in master via 780ecb6. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
- Loading branch information
Showing
2 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters