summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-06-28 09:45:27 +0200
committerGitHub <noreply@github.com>2019-06-28 09:45:27 +0200
commitfd64f47eee6c9a85198ac5dc2d117271fed23535 (patch)
tree1b6f93c337017b47dffa9b3fe99d416a0a314ad4
parentc272bee8336a80d7dbe90e576cc2081b0eafffaa (diff)
parent0be423ae6767d0634f73150661e6540e18ff93f6 (diff)
downloadnextcloud-server-fd64f47eee6c9a85198ac5dc2d117271fed23535.tar.gz
nextcloud-server-fd64f47eee6c9a85198ac5dc2d117271fed23535.zip
Merge pull request #16134 from nextcloud/backport/16121/stable15
[stable15] Don't allow to disable encryption via the API
-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');
}
}