From f08d82a7ab2eab393fbb03a5ec1146101b9e8c4b Mon Sep 17 00:00:00 2001 From: jakani24 Date: Tue, 25 Jun 2024 20:42:28 +0200 Subject: [PATCH] Update manage_incident.php --- .../secure_zone/php/manage_incident.php | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/server/cyberhex-code/system/secure_zone/php/manage_incident.php b/src/server/cyberhex-code/system/secure_zone/php/manage_incident.php index bf41be6..1700c2f 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/manage_incident.php +++ b/src/server/cyberhex-code/system/secure_zone/php/manage_incident.php @@ -70,15 +70,10 @@ if(isset($_GET["update_box_id"])){ if(isset($_GET["upload_evidence"])){ $incident_id=htmlspecialchars($_GET["incident_id"]); $target_dir = "/var/www/html/incidents/$incident_id/evidence"; - $original_filename = basename($_FILES["fileToUpload"]["name"]); $new_filename = $original_filename . ".evidence"; $target_file = $target_dir . $new_filename; - if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { - echo "The file " . htmlspecialchars($original_filename) . " has been uploaded as "; - } else { - echo "Sorry, there was an error uploading your file."; - } + move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file); } ?> @@ -146,16 +141,33 @@ if(isset($_GET["upload_evidence"])){