parent
36e2dad270
commit
4acfd4d823
5
run.py
5
run.py
|
@ -62,7 +62,10 @@ def allowed_file(filename):
|
||||||
if config["ALLOW_ALL_FILES"]:
|
if config["ALLOW_ALL_FILES"]:
|
||||||
return True
|
return True
|
||||||
else:
|
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'])
|
@app.route('/', methods=['GET', 'POST'])
|
||||||
|
|
Loading…
Reference in New Issue