forked from rDrama/rDrama
1
0
Fork 0

check filetype (thx drT)

master
Aevann1 2022-09-09 11:31:11 +02:00
parent acf6ca7d74
commit 500c1ba3c1
1 changed files with 2 additions and 1 deletions

View File

@ -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):