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

index 6b60d6701d47a4b467b8a750c88fad79d5a45c75..b4fdcf922dc457bba76032d808cb4b95cc1a6dc4 100644 (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,