From cb733f4cd817dc401dd0d10b7c9fd6169b8fa216 Mon Sep 17 00:00:00 2001 From: jakani24 Date: Wed, 7 Feb 2024 16:42:34 +0100 Subject: [PATCH] Update client_settings.php --- .../cyberhex-code/system/secure_zone/php/client_settings.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/cyberhex-code/system/secure_zone/php/client_settings.php b/src/server/cyberhex-code/system/secure_zone/php/client_settings.php index 2280e5b..b54f042 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/client_settings.php +++ b/src/server/cyberhex-code/system/secure_zone/php/client_settings.php @@ -36,10 +36,11 @@ function safe_settings(){ die("Connection failed: " . $conn->connect_error); } $value=htmlspecialchars($_GET["value"]); + $name=htmlspecialchars($_GET["update"]); //update what should be done if a virus is found if($_GET["update"]=="setting_virus_ctrl_virus_found_action"){ - $stmt = $conn->prepare("INSERT INTO settings (value) VALUES (?) ON DUPLICATE KEY UPDATE value = '?' WHERE name = 'virus_ctrl:virus_found:action';"); - $stmt->bind_param("ss", $value,$value); + $stmt = $conn->prepare("INSERT INTO settings (value,name) VALUES (?,?) ON DUPLICATE KEY UPDATE value = '?' WHERE name = 'virus_ctrl:virus_found:action';"); + $stmt->bind_param("ss", $value,$name,$value); $stmt->execute(); $stmt->close(); $conn->close();