From 6da7ec2d6718a53d5111ee1a489698c017c409a8 Mon Sep 17 00:00:00 2001 From: marcsello Date: Sat, 28 Nov 2020 20:55:25 +0100 Subject: [PATCH] Fixed filenames missing some letters --- src/views/contentview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/contentview.py b/src/views/contentview.py index 1a2e556..602d544 100644 --- a/src/views/contentview.py +++ b/src/views/contentview.py @@ -39,7 +39,8 @@ class ContentView(FlaskView): if not p: 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: filename = str(p.item.id)