diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-27 19:40:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 19:40:57 +0100 |
commit | 977db7eabc30cd9d84f22330a114cb9d904cb514 (patch) | |
tree | bcc2cb0dbad3ea27c38e676a20f3a377b50e9066 /application/front/controller/visitor | |
parent | e6215a2ad97182efcf88ef532ec6bd65ae35fd19 (diff) | |
parent | 9c04921a8c28c18ef757f2d43ba35e7e2a7f1a4b (diff) | |
download | Shaarli-977db7eabc30cd9d84f22330a114cb9d904cb514.tar.gz Shaarli-977db7eabc30cd9d84f22330a114cb9d904cb514.tar.zst Shaarli-977db7eabc30cd9d84f22330a114cb9d904cb514.zip |
Merge pull request #1597 from ArthurHoaro/feature/share-private-bookmark
Feature: Share private bookmarks using a URL containing a private key
Diffstat (limited to 'application/front/controller/visitor')
-rw-r--r-- | application/front/controller/visitor/BookmarkListController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/application/front/controller/visitor/BookmarkListController.php b/application/front/controller/visitor/BookmarkListController.php index 5267c8f5..78c474c9 100644 --- a/application/front/controller/visitor/BookmarkListController.php +++ b/application/front/controller/visitor/BookmarkListController.php | |||
@@ -137,8 +137,10 @@ class BookmarkListController extends ShaarliVisitorController | |||
137 | */ | 137 | */ |
138 | public function permalink(Request $request, Response $response, array $args): Response | 138 | public function permalink(Request $request, Response $response, array $args): Response |
139 | { | 139 | { |
140 | $privateKey = $request->getParam('key'); | ||
141 | |||
140 | try { | 142 | try { |
141 | $bookmark = $this->container->bookmarkService->findByHash($args['hash']); | 143 | $bookmark = $this->container->bookmarkService->findByHash($args['hash'], $privateKey); |
142 | } catch (BookmarkNotFoundException $e) { | 144 | } catch (BookmarkNotFoundException $e) { |
143 | $this->assignView('error_message', $e->getMessage()); | 145 | $this->assignView('error_message', $e->getMessage()); |
144 | 146 | ||