mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
featherwiki: Fix a type check failure
Due to a reassignment to a different type. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
2d0c2eb921
commit
0b758423a4
@ -52,9 +52,9 @@ def create_wiki(file_name: str):
|
||||
|
||||
|
||||
@privileged
|
||||
def add_wiki_file(upload_file_path: str):
|
||||
def add_wiki_file(upload_file: str):
|
||||
"""Add an uploaded wiki file."""
|
||||
upload_file_path = pathlib.Path(upload_file_path)
|
||||
upload_file_path = pathlib.Path(upload_file)
|
||||
temp_dir = tempfile.gettempdir()
|
||||
if not upload_file_path.is_relative_to(temp_dir):
|
||||
raise Exception('Uploaded file is not in expected temp directory.')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user