LLM OCP API: Fix security issue

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pull/38854/head
Marcel Klehr 3 years ago
parent 62b19e0675
commit f7e1e79880
  1. 4
      core/Controller/LanguageModelApiController.php

@ -85,6 +85,10 @@ class LanguageModelApiController extends \OCP\AppFramework\OCSController {
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,
]);

Loading…
Cancel
Save