From f60f835ccabbca108dfed0c2f040bd5d181731c0 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Sun, 28 Jul 2024 14:02:00 +0200 Subject: [PATCH] security/acme-client: fix PHP error; don't hide useful messages --- .../mvc/app/library/OPNsense/AcmeClient/LeAccount.php | 2 +- .../opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php index 682c2ed7f..e643696f2 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php @@ -228,7 +228,7 @@ class LeAccount extends LeCommon $this->fixConfig(); // Update account status. - LeUtils::log_debug('account registration successful for ' . $this->config->name); + LeUtils::log('account registration successful for ' . $this->config->name); $this->setStatus(200); } else { LeUtils::log_debug('account already registered: ' . (string)$this->config->name, $this->debug); diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php index 90db37293..7514ed656 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php @@ -209,10 +209,10 @@ class LeUtils // Get exit code $result = proc_close($proc); - log_debug(sprintf("AcmeClient: The shell command returned exit code '%d': '%s'", $result, $proc_cmd)); + self::log(sprintf("AcmeClient: The shell command returned exit code '%d': '%s'", $result, $proc_cmd)); return($result); } else { - log_error(sprintf("AcmeClient: Unable to prepare shell command '%s'", $proc_cmd)); + self::log_error(sprintf("AcmeClient: Unable to prepare shell command '%s'", $proc_cmd)); return(-999); } }