Merge pull request #2521 from nextcloud/bugfix/noid/db

This commit is contained in:
Julius Härtl
2020-11-13 16:07:23 +01:00
committed by GitHub
5 changed files with 122 additions and 41 deletions

View File

@@ -172,6 +172,10 @@ class CardService {
throw new BadRequestException('title must be provided');
}
if (mb_strlen($title) > Card::TITLE_MAX_LENGTH) {
throw new BadRequestException('The title cannot exceed 255 characters');
}
if (is_numeric($stackId) === false) {
throw new BadRequestException('stack id must be a number');
}
@@ -270,6 +274,10 @@ class CardService {
throw new BadRequestException('title must be provided');
}
if (mb_strlen($title) > Card::TITLE_MAX_LENGTH) {
throw new BadRequestException('The title cannot exceed 255 characters');
}
if (is_numeric($stackId) === false) {
throw new BadRequestException('stack id must be a number $$$');
}
@@ -361,6 +369,10 @@ class CardService {
throw new BadRequestException('title must be provided');
}
if (mb_strlen($title) > Card::TITLE_MAX_LENGTH) {
throw new BadRequestException('The title cannot exceed 255 characters');
}
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);
if ($this->boardService->isArchived($this->cardMapper, $id)) {
throw new StatusException('Operation not allowed. This board is archived.');