mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
LLM OCP API: Fix security issue
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
62b19e0675
commit
f7e1e79880
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Reference in a new issue