From: Joas Schilling Date: Thu, 27 Jun 2019 12:54:28 +0000 (+0200) Subject: Don't allow to disable encryption via the API X-Git-Tag: v16.0.2RC1~3^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=771d2ba952f1462831afcc29e6229c51c0bb5049;p=nextcloud-server.git Don't allow to disable encryption via the API Signed-off-by: Joas Schilling --- diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php index 38483d2796c..6e61e10a2f2 100644 --- a/apps/provisioning_api/lib/Controller/AppConfigController.php +++ b/apps/provisioning_api/lib/Controller/AppConfigController.php @@ -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'); } }