diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2017-01-17 11:01:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 11:01:42 +0100 |
commit | 012708e1badebe5dab6260c2e9edb521d5dbfee0 (patch) | |
tree | cc0e6a1abe9a38b03d1d922a832c78b50b3d87a2 /core | |
parent | b1a82969e66fb25d59cfef63d2a8744e374b2500 (diff) | |
parent | 5dc6899d1a3e11841b62971a52f0aa8e577c3065 (diff) | |
download | nextcloud-server-012708e1badebe5dab6260c2e9edb521d5dbfee0.tar.gz nextcloud-server-012708e1badebe5dab6260c2e9edb521d5dbfee0.zip |
Merge pull request #3023 from nextcloud/issue-2915-filter-out-sensitive-appconfigs
Filter out sensitive appconfig values
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Config/ListConfigs.php | 19 |
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[] |