Merge pull request #16134 from nextcloud/backport/16121/stable15

[stable15] Don't allow to disable encryption via the API
This commit is contained in:
Roeland Jago Douma 2019-06-28 09:45:27 +02:00 committed by GitHub
commit fd64f47eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,7 +153,7 @@ class AppConfigController extends OCSController {
throw new \InvalidArgumentException('The given key can not be set');
}
if ($app === 'core' && (strpos($key, 'public_') === 0 || strpos($key, 'remote_') === 0)) {
if ($app === 'core' && ($key === 'encryption_enabled' || strpos($key, 'public_') === 0 || strpos($key, 'remote_') === 0)) {
throw new \InvalidArgumentException('The given key can not be set');
}
}