From 81c7937ba71532f46eceb0fffd29f030c2a0ac6e Mon Sep 17 00:00:00 2001 From: Mathieu <mathieu.pionnier@maarch.org> Date: Wed, 26 Jan 2022 15:25:27 +0100 Subject: [PATCH] FEAT #18862 TIME 0:02 add back check --- src/app/attachment/controllers/AttachmentController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/attachment/controllers/AttachmentController.php b/src/app/attachment/controllers/AttachmentController.php index 190d54960de..22fe8b9d630 100755 --- a/src/app/attachment/controllers/AttachmentController.php +++ b/src/app/attachment/controllers/AttachmentController.php @@ -1038,6 +1038,8 @@ class AttachmentController return ['errors' => 'Body resIdMaster is empty or not an integer']; } elseif (!Validator::stringType()->notEmpty()->validate($body['type'])) { return ['errors' => 'Body type is empty or not a string']; + } elseif (!Validator::notEmpty()->validate($body['title']) || !Validator::length(1, 255)->validate($body['title'])) { + return ['errors' => 'Body title number of characters must be between 1 and 255 characters)']; } elseif (isset($body['status']) && !in_array($body['status'], ['A_TRA', 'TRA', 'SEND_MASS'])) { return ['errors' => 'Body status can only be A_TRA, TRA or SEND_MASS']; } -- GitLab