aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-06-27 14:54:28 +0200
committerBackportbot <backportbot-noreply@rullzer.com>2019-06-27 20:20:14 +0000
commit0be423ae6767d0634f73150661e6540e18ff93f6 (patch)
treedb7a44e2ab20567ac1a47d5fc160bbef805dba17
parent1697f3472e72b2d723fd998e8d653250654f75ae (diff)
downloadnextcloud-server-0be423ae6767d0634f73150661e6540e18ff93f6.tar.gz
nextcloud-server-0be423ae6767d0634f73150661e6540e18ff93f6.zip
Don't allow to disable encryption via the API
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--apps/provisioning_api/lib/Controller/AppConfigController.php2
1 files changed, 1 insertions, 1 deletions
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');
}
}