From 8fcb854e911aaa67018957bcf07e42944d3aae39 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sat, 26 Feb 2022 21:59:01 +0000 Subject: [PATCH] Storing the secret in plaintext so we can use it during cron eventually --- get_settings.php | 2 +- post.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/get_settings.php b/get_settings.php index a1645649..15b0a8c5 100644 --- a/get_settings.php +++ b/get_settings.php @@ -10,7 +10,7 @@ $config_base_url = $row['config_base_url']; // Mesh Central $config_meshcentral_uri = $row['config_meshcentral_uri']; $config_meshcentral_user = $row['config_meshcentral_user']; -$config_meshcentral_secret = decryptLoginEntry($row['config_meshcentral_secret']); +$config_meshcentral_secret = $row['config_meshcentral_secret']; // Mail $config_smtp_host = $row['config_smtp_host']; diff --git a/post.php b/post.php index c7e377c8..9bca1a79 100644 --- a/post.php +++ b/post.php @@ -717,7 +717,7 @@ if(isset($_POST['edit_general_settings'])){ $config_base_url = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['config_base_url']))); $mesh_uri = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['meshcentral_uri']))); $mesh_user = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['meshcentral_user']))); - $mesh_secret = encryptLoginEntry((mysqli_real_escape_string($mysqli,$_POST['meshcentral_secret']))); + $mesh_secret = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['meshcentral_secret']))); mysqli_query($mysqli,"UPDATE settings SET config_base_url = '$config_base_url', config_meshcentral_uri = '$mesh_uri', config_meshcentral_user = '$mesh_user', config_meshcentral_secret = '$mesh_secret' WHERE company_id = $session_company_id");