diff options
author | Joas Schilling <coding@schilljs.com> | 2022-08-26 13:58:18 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-08-26 13:58:18 +0200 |
commit | d41841b4a70fee2068bd6b3dcea04daf9605e5b7 (patch) | |
tree | 6be6862e22804bc9bc94d64c783da7a01146029a /apps | |
parent | b044c7586b25fbda46f4097a1a567ab06de55cdc (diff) | |
download | nextcloud-server-d41841b4a70fee2068bd6b3dcea04daf9605e5b7.tar.gz nextcloud-server-d41841b4a70fee2068bd6b3dcea04daf9605e5b7.zip |
Check address book URI length before creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-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 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, |