From 19dc514fe68ceec31bedda93c83751ddbd0d67e0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 27 Mar 2025 10:13:50 +0100 Subject: ♻️ use specific library to sanitize files path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/utils.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'ishtar_common/utils.py') 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 -- cgit v1.2.3