diff --git a/files/routes/static.py b/files/routes/static.py index ebcd86d2c..42af97baf 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -461,7 +461,8 @@ def submit_marsey(v): return {"error":"Image uploads are not allowed through TOR."} file = request.files["image"] - if not file: return {"error": "You need to submit an image!"} + if not file or not file.content_type.startswith('image/'): + return {"error": "You need to submit an image!"} name = request.values.get('name').lower() if not marsey_regex.fullmatch(name):