Storing the secret in plaintext so we can use it during cron eventually

This commit is contained in:
Marcus Hill 2022-02-26 21:59:01 +00:00
parent 534a192981
commit 8fcb854e91
2 changed files with 2 additions and 2 deletions

View File

@ -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'];

View File

@ -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");