From 83098428bbb3cef42c27edaba1a5a1cfefb0129d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 21 Jun 2024 04:03:11 -0600 Subject: [PATCH 1/2] Update StatusController, fix unlisted post guest/ap access bug --- app/Http/Controllers/StatusController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 3d8ff95c0..ba02cd015 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -43,7 +43,7 @@ class StatusController extends Controller $status['account']['username'] != $username || isset($status['reblog']), 404); - abort_if($status['visibility'] != 'public' && ! $request->user(), 403, 'Invalid permission'); + abort_if(! in_array($status['visibility'], ['public', 'unlisted']) && ! $request->user(), 403, 'Invalid permission'); if ($request->wantsJson() && (bool) config_cache('federation.activitypub.enabled')) { return $this->showActivityPub($request, $status); From aca02ae277bbea4e7568aaf52d4f008f63317677 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 21 Jun 2024 04:04:01 -0600 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e6f7cb2..03df4d570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - Update DirectMessageController, add carousel entity to threads ([96f24f33](https://github.com/pixelfed/pixelfed/commit/96f24f33)) - Update and refactor total local post count logic, cache value and schedule updates twice daily to eliminate the perf issue on larger instances ([4f2b8ed2](https://github.com/pixelfed/pixelfed/commit/4f2b8ed2)) - Update Media model, fix broken thumbnail/gray thumbnail bug ([e33643c2](https://github.com/pixelfed/pixelfed/commit/e33643c2)) +- Update StatusController, fix unlisted post guest/ap access bug ([83098428](https://github.com/pixelfed/pixelfed/commit/83098428)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.12.1 (2024-05-07)](https://github.com/pixelfed/pixelfed/compare/v0.12.0...v0.12.1)