]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: Don't validate input again upon running a task
authorMarcel Klehr <mklehr@gmx.net>
Thu, 25 Jul 2024 08:27:45 +0000 (10:27 +0200)
committerMarcel Klehr <mklehr@gmx.net>
Thu, 25 Jul 2024 08:27:45 +0000 (10:27 +0200)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
lib/private/TaskProcessing/Manager.php

index 2e67d12029a0792742c5176aa77904ed3557a693..73086b55e561742fd360e2f2013b7ed5e083757c 100644 (file)
@@ -1052,15 +1052,8 @@ class Manager implements IManager {
        public function prepareInputData(Task $task): array {
                $taskTypes = $this->getAvailableTaskTypes();
                $inputShape = $taskTypes[$task->getTaskTypeId()]['inputShape'];
-               $inputShapeDefaults = $taskTypes[$task->getTaskTypeId()]['inputShapeDefaults'];
-               $inputShapeEnumValues = $taskTypes[$task->getTaskTypeId()]['inputShapeEnumValues'];
                $optionalInputShape = $taskTypes[$task->getTaskTypeId()]['optionalInputShape'];
-               $optionalInputShapeEnumValues = $taskTypes[$task->getTaskTypeId()]['optionalInputShapeEnumValues'];
-               $optionalInputShapeDefaults = $taskTypes[$task->getTaskTypeId()]['optionalInputShapeDefaults'];
                $input = $task->getInput();
-               // validate input, again for good measure (should have been validated in scheduleTask)
-               $this->validateInput($inputShape, $inputShapeDefaults, $inputShapeEnumValues, $input);
-               $this->validateInput($optionalInputShape, $optionalInputShapeDefaults, $optionalInputShapeEnumValues, $input, true);
                $input = $this->removeSuperfluousArrayKeys($input, $inputShape, $optionalInputShape);
                $input = $this->fillInputFileData($task->getUserId(), $input, $inputShape, $optionalInputShape);
                return $input;