Merge pull request #16121 from nextcloud/bugfix/noid/dont-allow-to-disable-encryption-via-the-api

Don't allow to disable encryption via the API
pull/16136/head
Roeland Jago Douma 7 years ago committed by GitHub
commit 01f8fb00bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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');
}
}

Loading…
Cancel
Save