From 8c73c1ea5e2786d3d47e0553d98d0b727c26c6d6 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 27 Jun 2019 14:54:28 +0200 Subject: [PATCH] Don't allow to disable encryption via the API Signed-off-by: Joas Schilling --- apps/provisioning_api/lib/Controller/AppConfigController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php index 38483d2796..6e61e10a2f 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'); } }