Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔒️ Enforce valid type on copy/move of uploads
Also enforce that on downloads and mirror it on the API. Prevents accidental or intentional renaming of valid files to something like .html to e.g. attempt to run arbitrary JS code in the browser on "download" in the context of the OctoPrint URL. Stealing login credentials via XSS is very unlikely here given their http-only nature, however it's still better to prevent this from happening anyhow.
- Loading branch information
Showing
3 changed files
with
68 additions
and
32 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