-
File Test Results
- {% if result.success %}
- {% if result.status == "CLEAN" %}
-
Clean File!
- {% else %}
-
Please check the details of the scan!
- {% endif %}
-
-
Details of the scan.
- {% endif %}
-
- Results provided by the
Pandora Analysis framework.
-
+
+
+
+
File Test Results
+ {% if result.success %}
+ {% if result.status == "CLEAN" %}
+
Clean File!
+ {% else %}
+
Please check the details of the scan!
+ {% endif %}
+
+
Details of the scan.
+ {% endif %}
+
+ Results provided by the
Pandora Analysis framework.
+
+
+
-
{% endif %}
{% endblock %}
diff --git a/testing/templates/check_infra.html b/testing/templates/check_infra.html
index e080765..8e198b4 100644
--- a/testing/templates/check_infra.html
+++ b/testing/templates/check_infra.html
@@ -36,9 +36,11 @@
class="text-white button-text-background primary-primary-blue_background">
{% if services %}
-
+ {% if user.is_authenticated %}
+
+ {% endif %}
{% endif %}
About the test
diff --git a/testing/templates/check_webapp.html b/testing/templates/check_webapp.html
index 3939f19..0634ff7 100644
--- a/testing/templates/check_webapp.html
+++ b/testing/templates/check_webapp.html
@@ -39,9 +39,11 @@
Assesses web security, includin
class="text-white button-text-background primary-primary-blue_background">
{% if domain %}
-
+ {% if user.is_authenticated %}
+
+ {% endif %}
{% endif %}
diff --git a/testing/views.py b/testing/views.py
index 57af4d6..4007ad1 100644
--- a/testing/views.py
+++ b/testing/views.py
@@ -226,12 +226,15 @@ def email_test(request):
def file_test(request):
- if request.method == "POST" and request.FILES["target"]:
- context: Dict[str, Any] = {}
- file_to_check = request.FILES["target"].read()
- file_to_check_name = request.FILES["target"].name
- context.update(file_check(file_to_check, file_to_check_name))
- return render(request, "check_file.html", context)
+ if request.method == "POST":
+ if "target" in request.FILES:
+ context: Dict[str, Any] = {}
+ file_to_check = request.FILES["target"].read()
+ file_to_check_name = request.FILES["target"].name
+ context.update(file_check(file_to_check, file_to_check_name))
+ return render(request, "check_file.html", context)
+ else:
+ return render(request, "check_file.html", {"error": "There was an error with the provided file. Please try again later."})
else:
return render(request, "check_file.html")