Add blank path validation. Close #2.

This commit is contained in:
sc0tfree 2020-02-18 20:57:53 -05:00
parent 5566289daf
commit 39d544a932
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ def main():
path = request.form['path']
# Prevent file upload to paths outside of base directory
if not is_valid_subpath(path, base_directory):
if not is_valid_subpath(path, base_directory) or path == '':
return redirect(request.referrer)
for file in request.files.getlist('file'):