diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-28 13:22:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-28 13:22:40 +0100 |
commit | d2bb40cc7ca2a7f9c2403087016a0050a7113e07 (patch) | |
tree | 9c89e229f0d1ea98770b1477081704d436dbc49c /application/bookmark/BookmarkFileService.php | |
parent | 06734af130e52eec5cb1fa51b26edebbfa4bc798 (diff) | |
parent | 156061d445fd23d033a52f84954484a3349c988a (diff) | |
download | Shaarli-d2bb40cc7ca2a7f9c2403087016a0050a7113e07.tar.gz Shaarli-d2bb40cc7ca2a7f9c2403087016a0050a7113e07.tar.zst Shaarli-d2bb40cc7ca2a7f9c2403087016a0050a7113e07.zip |
Merge pull request #1613 from ArthurHoaro/hotfix/404-not-authorized
Raise 404 error instead of 500 if permalink access is denied
Diffstat (limited to 'application/bookmark/BookmarkFileService.php')
-rw-r--r-- | application/bookmark/BookmarkFileService.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application/bookmark/BookmarkFileService.php b/application/bookmark/BookmarkFileService.php index 0df2f47f..3ea98a45 100644 --- a/application/bookmark/BookmarkFileService.php +++ b/application/bookmark/BookmarkFileService.php | |||
@@ -106,7 +106,7 @@ class BookmarkFileService implements BookmarkServiceInterface | |||
106 | && $first->isPrivate() | 106 | && $first->isPrivate() |
107 | && (empty($privateKey) || $privateKey !== $first->getAdditionalContentEntry('private_key')) | 107 | && (empty($privateKey) || $privateKey !== $first->getAdditionalContentEntry('private_key')) |
108 | ) { | 108 | ) { |
109 | throw new Exception('Not authorized'); | 109 | throw new BookmarkNotFoundException(); |
110 | } | 110 | } |
111 | 111 | ||
112 | return $first; | 112 | return $first; |