aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-08-04 14:10:58 +0200
committerRobin Appelman <robin@icewind.nl>2025-08-04 14:11:51 +0200
commite9cec957029432ee7af0dbde42e4928d0d8567fc (patch)
tree9aea5dcd10ae138d325cc9300ea481bce3ed09d5
parent6bc6ed95a3d7d56a2313b68dd55ef66eb45dc1f7 (diff)
downloadnextcloud-server-extra_sensitive_values.tar.gz
nextcloud-server-extra_sensitive_values.zip
feat: allow admins to configure additional sensitive config valuesextra_sensitive_values
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/SystemConfig.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/SystemConfig.php b/lib/private/SystemConfig.php
index 57777b06ed6..3a7d59eab39 100644
--- a/lib/private/SystemConfig.php
+++ b/lib/private/SystemConfig.php
@@ -15,8 +15,9 @@ use OCP\IConfig;
* fixes cyclic DI: AllConfig needs AppConfig needs Database needs AllConfig
*/
class SystemConfig {
- /** @var array */
- protected $sensitiveValues = [
+ protected array $sensitiveValues;
+
+ const DEFAULT_SENSITIVE_VALUES = [
'instanceid' => true,
'datadirectory' => true,
'dbname' => true,
@@ -114,6 +115,7 @@ class SystemConfig {
public function __construct(
private Config $config,
) {
+ $this->sensitiveValues = array_merge(self::DEFAULT_SENSITIVE_VALUES, $this->config->getValue('config_extra_sensitive_values', []));
}
/**