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

github.com/nextcloud/deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-11-03 22:37:47 +0300
committerJulius Härtl <jus@bitgrid.net>2022-11-03 22:39:20 +0300
commited282479a17ce4a1cd31ce04f405fdcaffcb0b5c (patch)
tree3fe3c1edfcbf5e0422147c565e69e88219a918de
parentb648947ad7121230a7f50ca9564bd27056592872 (diff)
Fix validation of attachment data
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--lib/Service/AttachmentService.php2
-rw-r--r--tests/integration/features/bootstrap/AttachmentContext.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Service/AttachmentService.php b/lib/Service/AttachmentService.php
index f9eb9682..b563f0bc 100644
--- a/lib/Service/AttachmentService.php
+++ b/lib/Service/AttachmentService.php
@@ -194,7 +194,7 @@ class AttachmentService {
* @throws BadRequestException
*/
public function create($cardId, $type, $data) {
- $this->attachmentServiceValidator->check(compact('cardId', 'type', 'data'));
+ $this->attachmentServiceValidator->check(compact('cardId', 'type'));
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT);
diff --git a/tests/integration/features/bootstrap/AttachmentContext.php b/tests/integration/features/bootstrap/AttachmentContext.php
index 38172075..051789ae 100644
--- a/tests/integration/features/bootstrap/AttachmentContext.php
+++ b/tests/integration/features/bootstrap/AttachmentContext.php
@@ -67,6 +67,7 @@ class AttachmentContext implements Context {
* @Given remember the last attachment as :arg1
*/
public function rememberTheLastAttachmentAs($arg1) {
+ $this->requestContext->theResponseShouldHaveStatusCode(200);
$this->lastAttachment = $this->requestContext->getResponseBodyFromJson();
$this->rememberedAttachments[$arg1] = $this->lastAttachment;
}