mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
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.
This commit is contained in:
parent
d9b37ca7c3
commit
efebf6b2a3
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue