]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controller/visitor/BookmarkListController.php
Feature: Share private bookmarks using a URL containing a private key
[github/shaarli/Shaarli.git] / application / front / controller / visitor / BookmarkListController.php
index 5267c8f5bd14d77830800d4192232534084c8933..78c474c9095fd20e7377e3414c01c976ec8a4f97 100644 (file)
@@ -137,8 +137,10 @@ class BookmarkListController extends ShaarliVisitorController
      */
     public function permalink(Request $request, Response $response, array $args): Response
     {
+        $privateKey = $request->getParam('key');
+
         try {
-            $bookmark = $this->container->bookmarkService->findByHash($args['hash']);
+            $bookmark = $this->container->bookmarkService->findByHash($args['hash'], $privateKey);
         } catch (BookmarkNotFoundException $e) {
             $this->assignView('error_message', $e->getMessage());