-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request from GHSA-wm8q-9975-xh5v
* Allow only some image types to be displayed inline. Force download for others, especially SVG images. By default we use a list of allowed types. You can switch a to a list of denied types by setting OS environment variable ``OFS_IMAGE_USE_DENYLIST=1``. This change only affects direct URL access. ``<img src="image.svg" />`` works the same as before. See security advisory: GHSA-wm8q-9975-xh5v * svg download: only encode filename when it is not bytes. On Python 2.7 it is already bytes. * Use guess_extension as first guess for the extension of an image. * Support overriding ALLOWED_INLINE_MIMETYPES and DISALLOWED_INLINE_MIMETYPES. * Test that filename of attachment gets encoded correctly. * Add CVE --------- Co-authored-by: Michael Howitz <[email protected]>
- Loading branch information
1 parent
a0aa2ff
commit 26a55db
Showing
3 changed files
with
165 additions
and
0 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
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