Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-08-26 14:58:18 +0300
committerJoas Schilling <coding@schilljs.com>2022-08-26 14:58:18 +0300
commitd41841b4a70fee2068bd6b3dcea04daf9605e5b7 (patch)
tree6be6862e22804bc9bc94d64c783da7a01146029a
parentb044c7586b25fbda46f4097a1a567ab06de55cdc (diff)
Check address book URI length before creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 6b60d6701d4..b4fdcf922dc 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -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,