bandit: ignore md5 usage for download slot names

This commit is contained in:
Adrián Chaves 2024-02-29 11:31:39 +01:00
parent 2bfd9a2257
commit 31cbbb5758
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ def _path_safe(text):
pathable_slot = "".join([c if c.isalnum() or c in "-._" else "_" for c in text])
# as we replace some letters we can get collision for different slots
# add we add unique part
unique_slot = hashlib.md5(text.encode("utf8")).hexdigest()
unique_slot = hashlib.md5(text.encode("utf8")).hexdigest() # nosec
return "-".join([pathable_slot, unique_slot])