Skip to content

Commit

Permalink
LLM OCP API: Fix security issue
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Jul 7, 2023
1 parent 62b19e0 commit f7e1e79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/Controller/LanguageModelApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public function getTask(int $id): DataResponse {
try {
$task = $this->languageModelManager->getTask($id);

if ($this->userId !== $task->getUserId()) {
return new DataResponse(['message' => $this->l->t('Task not found')], Http::STATUS_NOT_FOUND);
}

return new DataResponse([
'task' => $task,
]);
Expand Down

0 comments on commit f7e1e79

Please sign in to comment.