Improve MIME-type checks of uploaded files

This commit adds a check if the MIME-type of the uploaded file (detected using the magic bytes) matches the file extension.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren
2020-12-27 11:31:01 +01:00
parent f83e4d66ed
commit cf4344d9e0
3 changed files with 302 additions and 49 deletions

View File

@@ -43,6 +43,7 @@
"express": ">=4.14",
"express-session": "^1.14.2",
"file-saver": "^1.3.3",
"file-type": "^16.1.0",
"flowchart.js": "^1.6.4",
"fork-awesome": "^1.1.3",
"formidable": "^1.0.17",