Also remove token when we successfully validated

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-10-11 20:39:39 +02:00 committed by backportbot-nextcloud[bot]
parent 1d02efdd8b
commit 1db6d96e94

View file

@ -119,8 +119,9 @@ class OpenLocalEditorController extends OCSController {
return $response;
}
$this->mapper->delete($entity);
if ($entity->getExpirationTime() <= $this->timeFactory->getTime()) {
$this->mapper->delete($entity);
return new DataResponse([], Http::STATUS_NOT_FOUND);
}