Commit 4acfd4d8 authored by Dominik V. Salonen's avatar Dominik V. Salonen Committed by GitHub

Add blacklist support

plz work
parent 36e2dad2
......@@ -62,7 +62,10 @@ def allowed_file(filename):
if config["ALLOW_ALL_FILES"]:
return True
else:
return '.' in filename and filename.rsplit('.', 1)[1] in config["ALLOWED_EXTENSIONS"]
if config["BLACKLIST"]:
return '.' in filename and filename.rsplit('.', 1)[1] in config["BANNED_EXTENSIONS"]
else:
return '.' in filename and filename.rsplit('.', 1)[1] in config["ALLOWED_EXTENSIONS"]
@app.route('/', methods=['GET', 'POST'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment