From efebf6b2a3eb85552e14d345372e80857e2ead7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Wed, 7 Aug 2024 16:46:31 +0100 Subject: [PATCH] refactor: Handle edge case in main.py for current_file parameter The main.py file has been refactored to handle an edge case where the current_file parameter is empty. This change ensures that the code correctly checks for the presence of the current_file parameter before performing further actions. --- src/ui/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/main.py b/src/ui/main.py index 63a9b5d74..320431311 100644 --- a/src/ui/main.py +++ b/src/ui/main.py @@ -2142,7 +2142,7 @@ def logs(): current_file = secure_filename(request.args.get("file", "")) - if current_file not in files: + if current_file and current_file not in files: return Response("No such file", 404) if isabs(current_file) or ".." in current_file: