Merge pull request #61661 from nextcloud/backport/61608/stable33
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable33, 8.4, stable33, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions
Psalm static code analysis / static-code-analysis (push) Has been cancelled
Psalm static code analysis / static-code-analysis-security (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ocp (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ncu (push) Has been cancelled

[stable33] fix(config): Decrypt sensitive appconfigs when requested
This commit is contained in:
Joas Schilling 2026-06-30 11:32:10 +02:00 committed by GitHub
commit b19e01ccc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 11 deletions

View file

@ -2920,11 +2920,7 @@
<DeprecatedMethod>
<code><![CDATA[\OC_App::getAllApps()]]></code>
<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>

View file

@ -127,7 +127,7 @@ class ListConfigs extends Base {
if ($noSensitiveValues) {
return $this->appConfig->getFilteredValues($app);
} else {
return $this->appConfig->getValues($app, false);
return $this->appConfig->getAllValues($app);
}
}

View file

@ -258,6 +258,13 @@ class AppConfig implements IAppConfig {
);
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;
}

View file

@ -106,10 +106,10 @@ class ListConfigsTest extends TestCase {
],
// app config
[
['files', false, [
['files', [
'enabled' => 'yes',
]],
['core', false, [
['core', [
'global_cache_gc_lastrun' => '1430388388',
]],
],
@ -242,10 +242,10 @@ class ListConfigsTest extends TestCase {
],
// app config
[
['files', false, [
['files', [
'enabled' => 'yes',
]],
['core', false, [
['core', [
'global_cache_gc_lastrun' => '1430388388',
]],
],
@ -280,7 +280,7 @@ class ListConfigsTest extends TestCase {
->method('getValue')
->willReturnMap($systemConfigMap);
$this->appConfig->expects($this->any())
->method('getValues')
->method('getAllValues')
->willReturnMap($appConfig);
} else {
$this->systemConfig->expects($this->any())
@ -295,7 +295,7 @@ class ListConfigsTest extends TestCase {
->method('getApps')
->willReturn(['core', 'files']);
$this->appConfig->expects($this->any())
->method('getValues')
->method('getAllValues')
->willReturnMap($appConfig);
$this->consoleInput->expects($this->once())