Don't allow to disable encryption via the API

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/16134/head
Joas Schilling 2019-06-27 14:54:28 +07:00 committed by Backportbot
parent 1697f3472e
commit 0be423ae67
1 changed files with 1 additions and 1 deletions

@ -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');
}
}