mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-04 12:24:52 +00:00
run ruff formatting
This commit is contained in:
parent
62712dcad3
commit
bf18dcbcf9
22 changed files with 82 additions and 75 deletions
|
@ -10,7 +10,7 @@ def path_traversal_check(unsafe_path, known_safe_path):
|
|||
unsafe_path = os.path.abspath(unsafe_path)
|
||||
|
||||
if (os.path.commonprefix([known_safe_path, unsafe_path]) != known_safe_path):
|
||||
raise SuspiciousFileOperation("{} is not safe".format(unsafe_path))
|
||||
raise SuspiciousFileOperation(f"{unsafe_path} is not safe")
|
||||
|
||||
# Passes the check
|
||||
return unsafe_path
|
Loading…
Add table
Add a link
Reference in a new issue