From 13d356ee62f7b998741708701f3b4bb45342694a Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 12 Feb 2025 16:47:24 +0100 Subject: [PATCH] fix: Set a token to shares retreived from the DB When accessing a circle share from the public share view, the `addOpenGraphHeaders` method was erroring in `DefaultPublicShareTemplateProvider`. This is due to the fact that the `$share` object for circles share does not contain a token, so the computation of the `$shareUrl` was failing. This commit ensures that the share has a token. Signed-off-by: Louis Chemineau --- lib/Model/ShareWrapper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Model/ShareWrapper.php b/lib/Model/ShareWrapper.php index 52b791f91..6b72b9d5e 100644 --- a/lib/Model/ShareWrapper.php +++ b/lib/Model/ShareWrapper.php @@ -400,6 +400,7 @@ public function getShare( $share->setTarget($this->getFileTarget()); $share->setProviderId($this->getProviderId()); $share->setStatus($this->getStatus()); + $share->setToken($this->getToken()); $share->setHideDownload($this->getHideDownload()); $share->setAttributes($this->getAttributes()); if ($this->hasShareToken()) {