Fixed filenames missing some letters

This commit is contained in:
Pünkösd Marcell 2020-11-28 20:55:25 +01:00
parent beb259b4d8
commit 6da7ec2d67

View File

@ -39,7 +39,8 @@ class ContentView(FlaskView):
if not p: if not p:
abort(403) abort(403)
filename = ''.join(filter(lambda x: x in string.ascii_lowercase, p.item.name)) allowed_chars = string.ascii_lowercase + string.ascii_uppercase + string.digits
filename = ''.join(filter(lambda x: x in allowed_chars, p.item.name)).lower()
if not filename: if not filename:
filename = str(p.item.id) filename = str(p.item.id)