From 1db6d96e9440290a97526ff61542149f792ef157 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 11 Oct 2022 20:39:39 +0200 Subject: [PATCH] Also remove token when we successfully validated Signed-off-by: Joas Schilling --- apps/files/lib/Controller/OpenLocalEditorController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files/lib/Controller/OpenLocalEditorController.php b/apps/files/lib/Controller/OpenLocalEditorController.php index ff39c1fe0e7..ad6783a3cb2 100644 --- a/apps/files/lib/Controller/OpenLocalEditorController.php +++ b/apps/files/lib/Controller/OpenLocalEditorController.php @@ -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); }