From d41d9887afb7290b7da44e109a17343509d81005 Mon Sep 17 00:00:00 2001 From: james1293 Date: Thu, 11 Jul 2019 11:35:01 -0400 Subject: [PATCH] if "*" in TODO_LIMIT_FILE_ATTACHMENTS, allow all --- todo/views/task_detail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todo/views/task_detail.py b/todo/views/task_detail.py index bf558d4..1578aaf 100644 --- a/todo/views/task_detail.py +++ b/todo/views/task_detail.py @@ -127,7 +127,7 @@ def task_detail(request, task_id: int) -> HttpResponse: name, extension = os.path.splitext(file.name) - if extension not in defaults("TODO_LIMIT_FILE_ATTACHMENTS"): + if extension not in defaults("TODO_LIMIT_FILE_ATTACHMENTS") and "*" not in defaults("TODO_LIMIT_FILE_ATTACHMENTS"): messages.error(request, f"This site does not allow upload of {extension} files.") return redirect("todo:task_detail", task_id=task.id)