Check address book URI length before creation

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-08-26 13:58:18 +02:00
parent b044c7586b
commit d41841b4a7
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205

View file

@ -389,6 +389,10 @@ class CardDavBackend implements BackendInterface, SyncSupport {
* @throws BadRequest
*/
public function createAddressBook($principalUri, $url, array $properties) {
if (strlen($url) > 255) {
throw new BadRequest('URI too long. Address book not created');
}
$values = [
'displayname' => null,
'description' => null,