diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-27 10:13:50 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-06-13 18:08:06 +0200 |
commit | 19dc514fe68ceec31bedda93c83751ddbd0d67e0 (patch) | |
tree | 75b80aea4f2178d422eed487037907e0408a9cec /ishtar_common/utils.py | |
parent | 85bcc4fe8aac85cb4800e5a43d169af64da423b1 (diff) | |
download | Ishtar-19dc514fe68ceec31bedda93c83751ddbd0d67e0.tar.bz2 Ishtar-19dc514fe68ceec31bedda93c83751ddbd0d67e0.zip |
♻️ use specific library to sanitize files path
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r-- | ishtar_common/utils.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 11e107c01..5dcfc119c 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -1822,14 +1822,6 @@ def clean_session_cache(session): cache.set(cache_key_list, [], settings.CACHE_TIMEOUT) -def sanitize_filepath(filepath): - #TODO: python3-pathvalidate - # from pathvalidate import sanitize_filepath - # filepath -> sanitize_filepath(filepath) - keep_characters = (" ", ".", "_", "-", "/") - return "".join(c for c in filepath if c.isalnum() or c in keep_characters).rstrip() - - def get_field_labels_from_path(model, path): """ :param model: base model |