Skip to content

Commit

Permalink
fix tests broken by fixes of CVE-2024-39330
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Jul 27, 2024
1 parent ffd70cb commit 26e8f9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions easy_thumbnails/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ def get_thumbnail_name(self, thumbnail_options, transparent=False):
"""
thumbnail_options = self.get_options(thumbnail_options)
path, source_filename = os.path.split(self.name)
# remove storage location
path = path.replace(self.source_storage.location, '')
# remove leading slash if present
path = path.lstrip('/')
source_extension = os.path.splitext(source_filename)[1][1:].lower()
preserve_extensions = self.thumbnail_preserve_extensions
if preserve_extensions is True or isinstance(preserve_extensions, (list, tuple)) and \
Expand Down

0 comments on commit 26e8f9f

Please sign in to comment.