From 6836b1ea78270f3d29a43f92b0d204e0ef1f7ac2 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 22 Sep 2021 22:37:33 -0400 Subject: [PATCH] Limit /redir links to private posts - This allows to share public post links with anonymous users --- include/conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index 507add97d6..33a7ea5dd3 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -177,7 +177,7 @@ function localize_item(&$item) // add sparkle links to appropriate permalinks // Only create a redirection to a magic link when logged in - if (!empty($item['plink']) && Session::isAuthenticated()) { + if (!empty($item['plink']) && Session::isAuthenticated() && $item['private'] == Item::PRIVATE) { $author = ['uid' => 0, 'id' => $item['author-id'], 'network' => $item['author-network'], 'url' => $item['author-link']]; $item['plink'] = Contact::magicLinkByContact($author, $item['plink']);