]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check address book URI length before creation 33784/head
authorJoas Schilling <coding@schilljs.com>
Fri, 26 Aug 2022 11:58:18 +0000 (13:58 +0200)
committerAnna Larch <anna@nextcloud.com>
Thu, 15 Sep 2022 11:59:15 +0000 (13:59 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/CardDAV/CardDavBackend.php

index 1c1754ff752f35c50f640a46119e1025fd3727d0..ebbf44376f57f7faa0a03c7922695bc1ace07614 100644 (file)
@@ -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,