parent
36e2dad270
commit
4acfd4d823
3
run.py
3
run.py
|
@ -61,6 +61,9 @@ def error_page(error, code):
|
||||||
def allowed_file(filename):
|
def allowed_file(filename):
|
||||||
if config["ALLOW_ALL_FILES"]:
|
if config["ALLOW_ALL_FILES"]:
|
||||||
return True
|
return True
|
||||||
|
else:
|
||||||
|
if config["BLACKLIST"]:
|
||||||
|
return '.' in filename and filename.rsplit('.', 1)[1] in config["BANNED_EXTENSIONS"]
|
||||||
else:
|
else:
|
||||||
return '.' in filename and filename.rsplit('.', 1)[1] in config["ALLOWED_EXTENSIONS"]
|
return '.' in filename and filename.rsplit('.', 1)[1] in config["ALLOWED_EXTENSIONS"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue