]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't allow to disable encryption via the API 16133/head
authorJoas Schilling <coding@schilljs.com>
Thu, 27 Jun 2019 12:54:28 +0000 (14:54 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Thu, 27 Jun 2019 20:19:34 +0000 (20:19 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/provisioning_api/lib/Controller/AppConfigController.php

index 38483d2796c93105ace4d6480be65de78a8147d2..6e61e10a2f23b1d9d8bc06430184292309e9482c 100644 (file)
@@ -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');
                }
        }