aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/SystemConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/SystemConfig.php')
-rw-r--r--lib/private/SystemConfig.php54
1 files changed, 24 insertions, 30 deletions
diff --git a/lib/private/SystemConfig.php b/lib/private/SystemConfig.php
index 0bc6154fbc4..7e8946f4d05 100644
--- a/lib/private/SystemConfig.php
+++ b/lib/private/SystemConfig.php
@@ -1,28 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Daniel Kesselberg <mail@danielkesselberg.de>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Johannes Schlichenmaier <johannes@schlichenmaier.info>
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC;
@@ -34,15 +15,16 @@ use OCP\IConfig;
* fixes cyclic DI: AllConfig needs AppConfig needs Database needs AllConfig
*/
class SystemConfig {
+ protected array $sensitiveValues;
- /** @var array */
- protected $sensitiveValues = [
+ protected const DEFAULT_SENSITIVE_VALUES = [
'instanceid' => true,
'datadirectory' => true,
'dbname' => true,
'dbhost' => true,
'dbpassword' => true,
'dbuser' => true,
+ 'dbreplica' => true,
'activity_dbname' => true,
'activity_dbhost' => true,
'activity_dbpassword' => true,
@@ -55,7 +37,10 @@ class SystemConfig {
'passwordsalt' => true,
'secret' => true,
'updater.secret' => true,
+ 'updater.server.url' => true,
'trusted_proxies' => true,
+ 'preview_imaginary_url' => true,
+ 'preview_imaginary_key' => true,
'proxyuserpwd' => true,
'sentry.dsn' => true,
'sentry.public-dsn' => true,
@@ -66,12 +51,17 @@ class SystemConfig {
'github.client_secret' => true,
'log.condition' => [
'shared_secret' => true,
+ 'matches' => true,
],
'license-key' => true,
'redis' => [
'host' => true,
'password' => true,
],
+ 'redis.cluster' => [
+ 'seeds' => true,
+ 'password' => true,
+ ],
'objectstore' => [
'arguments' => [
// Legacy Swift (https://github.com/nextcloud/server/pull/17696#discussion_r341302207)
@@ -84,6 +74,7 @@ class SystemConfig {
// S3
'key' => true,
'secret' => true,
+ 'sse_c_key' => true,
// Swift v2
'username' => true,
'password' => true,
@@ -115,13 +106,16 @@ class SystemConfig {
],
],
],
+ 'onlyoffice' => [
+ 'jwt_secret' => true,
+ ],
+ 'PASS' => true,
];
- /** @var Config */
- private $config;
-
- public function __construct(Config $config) {
- $this->config = $config;
+ public function __construct(
+ private Config $config,
+ ) {
+ $this->sensitiveValues = array_merge(self::DEFAULT_SENSITIVE_VALUES, $this->config->getValue('config_extra_sensitive_values', []));
}
/**