Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3002,11 +3002,7 @@
<file src="core/Command/Config/ListConfigs.php">
<DeprecatedMethod>
<code><![CDATA[getFilteredValues]]></code>
<code><![CDATA[getValues]]></code>
</DeprecatedMethod>
<FalsableReturnStatement>
<code><![CDATA[$this->appConfig->getValues($app, false)]]></code>
</FalsableReturnStatement>
</file>
<file src="core/Command/Db/ConvertType.php">
<DeprecatedMethod>
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Config/ListConfigs.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected function getAppConfigs(string $app, bool $noSensitiveValues) {
if ($noSensitiveValues) {
return $this->appConfig->getFilteredValues($app);
} else {
return $this->appConfig->getValues($app, false);
return $this->appConfig->getAllValues($app);
}
}

Expand Down
7 changes: 7 additions & 0 deletions lib/private/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ function (string $key) use ($prefix): bool {
);

if (!$filtered) {
foreach ($values as $key => $value) {
$sensitive = $this->isSensitive($app, $key, null);
if ($sensitive && is_string($value) && str_starts_with($value, self::ENCRYPTION_PREFIX)) {
$values[$key] = $this->crypto->decrypt(substr($value, self::ENCRYPTION_PREFIX_LENGTH));
}
}

return $values;
}

Expand Down
12 changes: 6 additions & 6 deletions tests/Core/Command/Config/ListConfigsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public static function listData(): array {
],
// app config
[
['files', false, [
['files', [
'enabled' => 'yes',
]],
['core', false, [
['core', [
'global_cache_gc_lastrun' => '1430388388',
]],
],
Expand Down Expand Up @@ -243,10 +243,10 @@ public static function listData(): array {
],
// app config
[
['files', false, [
['files', [
'enabled' => 'yes',
]],
['core', false, [
['core', [
'global_cache_gc_lastrun' => '1430388388',
]],
],
Expand Down Expand Up @@ -281,7 +281,7 @@ public function testList($app, $systemConfigs, $systemConfigMap, $appConfig, $pr
->method('getValue')
->willReturnMap($systemConfigMap);
$this->appConfig->expects($this->any())
->method('getValues')
->method('getAllValues')
->willReturnMap($appConfig);
} else {
$this->systemConfig->expects($this->any())
Expand All @@ -296,7 +296,7 @@ public function testList($app, $systemConfigs, $systemConfigMap, $appConfig, $pr
->method('getApps')
->willReturn(['core', 'files']);
$this->appConfig->expects($this->any())
->method('getValues')
->method('getAllValues')
->willReturnMap($appConfig);

$this->consoleInput->expects($this->once())
Expand Down
Loading