summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-01-11 11:42:36 +0100
committerJoas Schilling <coding@schilljs.com>2017-01-11 11:42:36 +0100
commitce7836378cf973ecebdd6d7790f9b3994f0e88f4 (patch)
tree9dd9dfa18cff4eebcd1a4475294956e6ff0132c0 /core
parentc4e51fd0557728a18a689d1160e00a09dfc6e789 (diff)
downloadnextcloud-server-ce7836378cf973ecebdd6d7790f9b3994f0e88f4.tar.gz
nextcloud-server-ce7836378cf973ecebdd6d7790f9b3994f0e88f4.zip
Filter out sensitive appconfig values
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-rw-r--r--core/Command/Config/ListConfigs.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/core/Command/Config/ListConfigs.php b/core/Command/Config/ListConfigs.php
index 2737bc2cea4..94b493c9244 100644
--- a/core/Command/Config/ListConfigs.php
+++ b/core/Command/Config/ListConfigs.php
@@ -89,14 +89,14 @@ class ListConfigs extends Base {
'apps' => [],
];
foreach ($apps as $appName) {
- $configs['apps'][$appName] = $this->appConfig->getValues($appName, false);
+ $configs['apps'][$appName] = $this->getAppConfigs($appName, $noSensitiveValues);
}
break;
default:
$configs = [
'apps' => [
- $app => $this->appConfig->getValues($app, false),
+ $app => $this->getAppConfigs($app, $noSensitiveValues),
],
];
}
@@ -130,6 +130,21 @@ class ListConfigs extends Base {
}
/**
+ * Get the app configs
+ *
+ * @param string $app
+ * @param bool $noSensitiveValues
+ * @return array
+ */
+ protected function getAppConfigs($app, $noSensitiveValues) {
+ if ($noSensitiveValues) {
+ return $this->appConfig->getFilteredValues($app, false);
+ } else {
+ return $this->appConfig->getValues($app, false);
+ }
+ }
+
+ /**
* @param string $argumentName
* @param CompletionContext $context
* @return string[]