0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Set default focal point key in filenames to 'focus-none'

This prevents filenames being generated with '..'
This commit is contained in:
Karl Hobley 2014-07-22 11:19:09 +01:00
parent 1801412693
commit dd7d4b671e

View File

@ -298,7 +298,7 @@ class Filter(models.Model):
if focal_point is not None:
focal_point_key = "focus-" + focal_point.get_key()
else:
focal_point_key = ""
focal_point_key = "focus-none"
input_filename_parts = os.path.basename(input_file.name).split('.')
filename_without_extension = '.'.join(input_filename_parts[:-1])