Skip to content

Commit 6739fa3

Browse files
committed
Allow updating media file even if path is disallowed (fixes #653)
1 parent 749fe9a commit 6739fa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gramps_webapi/api/file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ def get_file_size(self) -> int:
185185
"""
186186
try:
187187
self._check_path()
188-
except ValueError:
189-
abort_with_message(403, "File access not allowed")
188+
except ValueError as exc:
189+
raise FileNotFoundError from exc
190190
return os.path.getsize(self.path_abs)
191191

192192
def send_file(

0 commit comments

Comments
 (0)