From 4535f484a661fca97f6ac9c8d932cf4c3c03c9a5 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Tue, 9 Jul 2024 06:45:35 +0000 Subject: [PATCH] fix IP in html filename --- embark/reporter/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embark/reporter/views.py b/embark/reporter/views.py index b3533862..e947cf26 100644 --- a/embark/reporter/views.py +++ b/embark/reporter/views.py @@ -75,7 +75,7 @@ def html_report_path(request, analysis_id, html_path, file): Checks: valid filename, path.resolved in correct parent """ # make sure the html file is valid - file_pattern = re.compile(r'^[\w][\w\.]+\.(tar.gz|html)$') + file_pattern = re.compile(r'^[\w\.-]+\.(tar.gz|html)$') if FirmwareAnalysis.objects.filter(id=analysis_id).exists() and bool(re.match(file_pattern, file)): analysis = FirmwareAnalysis.objects.get(id=analysis_id) if analysis.hidden is False or analysis.user == request.user or request.user.is_superuser: