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:
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareAPIController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 50ba39564ba..78b2eb1bc53 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -1079,6 +1079,9 @@ class ShareAPIController extends OCSController {
// only link shares have labels
if ($share->getShareType() === IShare::TYPE_LINK && $label !== null) {
+ if (strlen($label) > 255) {
+ throw new OCSBadRequestException("Maxmimum label length is 255");
+ }
$share->setLabel($label);
}