diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-27 10:13:50 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-10-15 19:32:59 +0200 |
commit | cce78c74ee4bd53ed46f9e7798bd07b250835a68 (patch) | |
tree | c3ccbb181495b59dfedd5f7950295b144f91beed /ishtar_common/utils.py | |
parent | 089e88dafa924ba4e105d2955ea152e48ac0c43f (diff) | |
download | Ishtar-cce78c74ee4bd53ed46f9e7798bd07b250835a68.tar.bz2 Ishtar-cce78c74ee4bd53ed46f9e7798bd07b250835a68.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 52bcd3ddb..8d5f5ec20 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -1828,14 +1828,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 |