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-24 18:32:21 +0200 |
| commit | 0ada70719d6e607d2d14029f226c1cd61bb69514 (patch) | |
| tree | 4d25f949884e225a7ff1c168fec0955a395985b1 /ishtar_common/utils.py | |
| parent | 4d9590679fa91d2e17f3a18673c0dcd9fad42fd8 (diff) | |
| download | Ishtar-0ada70719d6e607d2d14029f226c1cd61bb69514.tar.bz2 Ishtar-0ada70719d6e607d2d14029f226c1cd61bb69514.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 |
