Skip to content

Commit

Permalink
Check address book URI length before creation
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and miaulalala committed Sep 15, 2022
1 parent ad0fca4 commit 992e05e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/dav/lib/CardDAV/CardDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatc
* @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,
Expand Down

0 comments on commit 992e05e

Please sign in to comment.