From 4e1dd59992c80b6543f0e80e663ea1b01040b3c1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 4 Jan 2025 04:42:59 -0700 Subject: [PATCH 1/3] Update CollectionController, fix showCollection signature --- app/Http/Controllers/CollectionController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/CollectionController.php b/app/Http/Controllers/CollectionController.php index 447490433..bc9518baa 100644 --- a/app/Http/Controllers/CollectionController.php +++ b/app/Http/Controllers/CollectionController.php @@ -29,7 +29,7 @@ class CollectionController extends Controller return view('collection.create', compact('collection')); } - public function show(Request $request, int $id) + public function show(Request $request, $id) { $user = $request->user(); $collection = CollectionService::getCollection($id); From 56f17b9957134293f33d37764a6e53db676218dd Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 4 Jan 2025 04:47:04 -0700 Subject: [PATCH 2/3] Update ApiV1Dot1Controller, fix in-app registration --- app/Http/Controllers/Api/ApiV1Dot1Controller.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Dot1Controller.php b/app/Http/Controllers/Api/ApiV1Dot1Controller.php index c84dcae1c..456f22da7 100644 --- a/app/Http/Controllers/Api/ApiV1Dot1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Dot1Controller.php @@ -629,9 +629,6 @@ class ApiV1Dot1Controller extends Controller abort_if(BouncerService::checkIp($request->ip()), 404); } - $rl = RateLimiter::attempt('pf:apiv1.1:iarc:'.$request->ip(), config('pixelfed.app_registration_confirm_rate_limit_attempts', 20), function () {}, config('pixelfed.app_registration_confirm_rate_limit_decay', 1800)); - abort_if(! $rl, 429, 'Too many requests'); - $request->validate([ 'user_token' => 'required', 'random_token' => 'required', @@ -658,7 +655,7 @@ class ApiV1Dot1Controller extends Controller $user->last_active_at = now(); $user->save(); - $token = $user->createToken('Pixelfed', ['read', 'write', 'follow', 'admin:read', 'admin:write', 'push']); + $token = $user->createToken('Pixelfed', ['read', 'write', 'follow', 'push']); return response()->json([ 'access_token' => $token->accessToken, @@ -1292,7 +1289,7 @@ class ApiV1Dot1Controller extends Controller if ($user->last_active_at == null) { return []; } - $defaultCaption = ""; + $defaultCaption = ''; $content = $request->filled('status') ? strip_tags(Purify::clean($request->input('status'))) : $defaultCaption; $cw = $user->profile->cw == true ? true : $request->boolean('sensitive', false); $spoilerText = $cw && $request->filled('spoiler_text') ? $request->input('spoiler_text') : null; From 27f1cdb6e4a622a9c72c9f7d966ccefe27bda74e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 4 Jan 2025 04:47:57 -0700 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d8a9063..ddc15ddf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ ## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.12.3...dev) - ### Features - WebGL photo filters ([#5374](https://github.com/pixelfed/pixelfed/pull/5374)) @@ -26,6 +25,9 @@ - Update db, fix sqlite migrations ([#5379](https://github.com/pixelfed/pixelfed/pull/5379)) - Update CatchUnoptimizedMedia command, make 1hr limit opt-in ([99b15b73](https://github.com/pixelfed/pixelfed/commit/99b15b73)) - Update IG, fix Instagram import. Closes #5411 ([fd434aec](https://github.com/pixelfed/pixelfed/commit/fd434aec)) +- Update StatusTagsPipeline, fix hashtag bug and formatting ([d516b799](https://github.com/pixelfed/pixelfed/commit/d516b799)) +- Update CollectionController, fix showCollection signature ([4e1dd599](https://github.com/pixelfed/pixelfed/commit/4e1dd599)) +- Update ApiV1Dot1Controller, fix in-app registration ([56f17b99](https://github.com/pixelfed/pixelfed/commit/56f17b99)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.12.4 (2024-11-08)](https://github.com/pixelfed/pixelfed/compare/v0.12.4...dev)