From b9cbc566b2b45ed156b252d4c790d9fcf3619f4b 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 3479bdd8e..c8cd5e1c5 100644 --- a/lib/Model/ShareWrapper.php +++ b/lib/Model/ShareWrapper.php @@ -380,6 +380,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()) {