From 195f7dd496da7905c9e62afe926717f102084a01 Mon Sep 17 00:00:00 2001 From: Christopher Maddalena Date: Mon, 10 Oct 2022 15:18:03 -0700 Subject: [PATCH] Fixed evidence files with uppercase extensions being ignored --- CHANGELOG.md | 4 ++++ ghostwriter/modules/reportwriter.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 171d54399..9790e100e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [3.0.7] - 10 October 2022 +### Fixed + +* Fixed evidence files with uppercase extensions not being included in rendered reports (Closes #74) + ### Added * Logs now have an option to mute notifications (available to users with the `admin` and `manager` roles) diff --git a/ghostwriter/modules/reportwriter.py b/ghostwriter/modules/reportwriter.py index d11ca195c..a43b36687 100644 --- a/ghostwriter/modules/reportwriter.py +++ b/ghostwriter/modules/reportwriter.py @@ -653,7 +653,7 @@ def process_evidence(self, evidence, par): Paragraph meant to hold the evidence """ file_path = settings.MEDIA_ROOT + "/" + evidence["path"] - extension = file_path.split(".")[-1] + extension = file_path.split(".")[-1].lower() # First, check if the file still exists on disk if os.path.exists(file_path):