Cleanup, bugfixes. Added access control on files and API.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from pathvalidate import sanitize_filepath
|
||||
import unicodedata
|
||||
from pathlib import PurePosixPath
|
||||
|
||||
from pathvalidate import sanitize_filepath
|
||||
|
||||
|
||||
def sanitize(filename: str) -> str:
|
||||
filename = unicodedata.normalize("NFC", filename)
|
||||
# UNIX filenames can contain backslashes but for compatibility we replace them with dashes
|
||||
|
||||
Reference in New Issue
Block a user