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.php39
1 files changed, 14 insertions, 25 deletions
diff --git a/lib/private/SystemConfig.php b/lib/private/SystemConfig.php
index f63663fbfe3..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,14 +15,16 @@ use OCP\IConfig;
* fixes cyclic DI: AllConfig needs AppConfig needs Database needs AllConfig
*/
class SystemConfig {
- /** @var array */
- protected $sensitiveValues = [
+ protected array $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,
@@ -54,8 +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,6 +51,7 @@ class SystemConfig {
'github.client_secret' => true,
'log.condition' => [
'shared_secret' => true,
+ 'matches' => true,
],
'license-key' => true,
'redis' => [
@@ -88,6 +74,7 @@ class SystemConfig {
// S3
'key' => true,
'secret' => true,
+ 'sse_c_key' => true,
// Swift v2
'username' => true,
'password' => true,
@@ -122,11 +109,13 @@ class SystemConfig {
'onlyoffice' => [
'jwt_secret' => true,
],
+ 'PASS' => true,
];
public function __construct(
private Config $config,
) {
+ $this->sensitiveValues = array_merge(self::DEFAULT_SENSITIVE_VALUES, $this->config->getValue('config_extra_sensitive_values', []));
}
/**