diff options
author | Joas Schilling <coding@schilljs.com> | 2022-08-26 14:58:18 +0300 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2022-09-15 14:59:15 +0300 |
commit | 992e05ecba26e6bb760de25a8c7e6e3ec75b6731 (patch) | |
tree | 69eb2b0abb2f78ee7b8b67636cd7218c8e73845b | |
parent | ad0fca4abdcd7768e52b05519a585fcb9e23e808 (diff) |
Check address book URI length before creationbackport/33139/stable23
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | apps/dav/lib/CardDAV/CardDavBackend.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 1c1754ff752..ebbf44376f5 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -416,6 +416,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, |