Commit 5558514f authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix

parent 83c7633a
...@@ -453,7 +453,7 @@ def store_doc( ...@@ -453,7 +453,7 @@ def store_doc(
if not unsanitized_filename.isascii(): if not unsanitized_filename.isascii():
is_valid_filename = False is_valid_filename = False
unvalidated_file_path = f"{UPLOAD_DIR}/{unsanitized_filename}" unvalidated_file_path = f"{UPLOAD_DIR}/{unsanitized_filename}"
dereferenced_file_path = str(Path(unvalidated_file_path).resolve(strict=False)) dereferenced_file_path = str(Path(unvalidated_file_path).resolve(strict=False))
if not dereferenced_file_path.startswith(UPLOAD_DIR): if not dereferenced_file_path.startswith(UPLOAD_DIR):
is_valid_filename = False is_valid_filename = False
......
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