Commit Graph

33 Commits (dev)

Author SHA1 Message Date
Daniel Supernault 9c81a75ad3
Refactor Direct Messages, add Group Chat support and proper context threading with Mastodon 2 days ago
Your Name 5e76ed99bf fix #7328 1 week ago
Your Name a14fba166f Fix cached-page 500s and flaky smoke/API tests
- terms/privacy/community-guidelines views accessed the cached page as an
  object ($page->title), but cachedPage() returns an array, causing a 500
  whenever a custom Page row existed. Switch to array access.
- PublicRouteSmokeTest: enable open_registration before hitting /register,
  which 404s by default when registration is disabled.
- Api/AccountTest: derive sanctum.stateful domain from app.url instead of
  hardcoding pixelfed.test, so the first-party auth test is environment
  independent.
1 week ago
Your Name 3a23606573 Enforce can-post role check on POST /api/v2/media 1 week ago
Your Name b4bd3c87a0 Validate report object_id as a positive integer to fix 500 on array input 1 week ago
Your Name b13c374f21 Guard home timeline filter against null account 1 week ago
Your Name 6ffdc53dee polish 2 weeks ago
Your Name 8aa3144745 Fix story video upload probe path (#7203)
apiV1Add passed an absolute path to FFMpeg::open(), which laravel-ffmpeg
resolves relative to the local disk root, producing a doubled path and an
ffprobe 'Unable to probe / No such file or directory' failure.

Open the file via the disk instead: FFMpeg::fromDisk('local')->open($path)
for local storage, and an on-demand local disk rooted at the temp dir for
cloud storage.

Adds feature tests that pin the disk-relative path resolution.
2 weeks ago
Shlee 289251985a
Merge pull request #7199 from pixelfed/fix/story-publish-validation-exception
Laravel 13 Prep: Stop swallowing overlay ValidationException into a generic 500
2 weeks ago
Your Name 62d3bc8406 Stop swallowing overlay ValidationException into a generic 500
publishNext() throws ValidationException::withMessages() for invalid
story overlays (bad text/hashtag/mention/url/type), but the enclosing
catch (\Exception $e) caught it too, since ValidationException extends
Exception. Clients got a generic 500 "Failed to create story" instead
of the intended 422 with field-level errors, and the log was flooded
with ordinary user-input validation failures logged as server errors.
Catch ValidationException separately, roll back, and rethrow it so
Laravel's exception handler renders the normal 422 response.
2 weeks ago
Your Name 8fa18ff8c6 Fix dangling DB transactions in CustomFilterController
store() and update() open a manual DB::beginTransaction() but had early
return paths (duplicate keyword, keyword not found, per-filter keyword
limit) that hit neither DB::commit() nor the catch block's rollback,
leaving the transaction open past the end of the request. Add the
missing DB::rollBack() call on each early-exit branch, matching the
manual-transaction pattern used elsewhere in the app.
2 weeks ago
Your Name 917a13d4a7 Filter null-account statuses from non-cached network timeline 2 weeks ago
Your Name eb9bd11303 Apply Pint lint fixes to session test files 2 weeks ago
Your Name d190ba7b66 Only dispatch SharePipeline for newly-created reblogs 2 weeks ago
Your Name 63e3c95fae Fix custom filter rate-limit counter never expiring 2 weeks ago
Shlee daf83fd564
Merge pull request #7132 from shleeable/fix/pat-renew-kill-switch
Enforce pat_enabled kill-switch on personal access token renew
2 weeks ago
Your Name d2b11a71b3 Enforce pat_enabled kill-switch on personal access token renew 2 weeks ago
Your Name 3cb5b6e1ff Fix login activity groupBy returning stale rows and 500 on strict DBs 2 weeks ago
Shlee 0900509c27
Merge pull request #7124 from shleeable/fix/collection-store-visibility-required
Require visibility on collection store to match NOT NULL schema
2 weeks ago
Shlee fe8c53ddd7
Merge pull request #7127 from shleeable/fix/favourites-pagination-off-by-one
Fix favourites pagination skipping one favourite per page
2 weeks ago
Your Name a286509622 Require visibility on collection store to match NOT NULL schema 2 weeks ago
Your Name e79135a771 Fix favourites pagination skipping one favourite per page boundary 2 weeks ago
Your Name 3b951d41d8 Fix accounts statuses max_id pagination returning duplicate boundary status 2 weeks ago
Your Name fbfd26d775 Mark direct messages read with a single bulk update
DirectMessageController@read fetched every matching DirectMessage and
saved each one individually in a loop, issuing one UPDATE per row. On an
active thread this is N queries.

Pluck the matching ids and perform a single bulk update, preserving the
existing response (the list of affected message ids) and updated_at
behaviour.

Adds regression tests covering the marked-read ids, the status_id lower
bound, and sender isolation.
3 weeks ago
Your Name 29280cd950 Fix silent failure in avatar upload endpoints
AvatarController@store and BaseApiController@avatarUpdate wrapped the
upload flow in an empty catch(\Exception) block and returned a success
response even when the upload or save failed.

Log the exception and return a real error response (500 JSON for the
API endpoint, a redirect with validation errors for the web endpoint).

Adds regression tests covering the failure path, the success path, and
non-image rejection.
3 weeks ago
Daniel Supernault c19fd269b1
Lint 3 weeks ago
Daniel Supernault 584ce27f71
Add Sanctum support 3 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Your Name 412c29bb47 Improve test assertions and imports 4 weeks ago
Your Name 0f3820e7bf test: add notification, search, compose, report, and collection tests (332 total)
Api/NotificationTest: notification isolation, correct user filtering
Api/SearchTest: v2 search auth, structure, account lookup
Api/CollectionTest: self/user collections, auth requirement
Compose/ComposeTest: page access, settings, media validation, autocomplete
Account/ReportTest: report creation, type validation, auth requirement
4 weeks ago
Your Name e1f883a41b test: add status, timeline, federation, and privacy tests (309 total)
Api/StatusTest: get/delete statuses, favourite/unfavourite, bookmark,
  status creation validation, ownership checks
Api/TimelineTest: public/home/hashtag timelines, private exclusion,
  pagination support
Federation/NodeInfoTest: nodeinfo, webfinger, host-meta endpoints
Account/PrivacyTest: private profile visibility, blocked user access,
  privacy settings toggle
4 weeks ago
Your Name 4ce28d9144 feat: add framework integration tests for Laravel 12→13 upgrade readiness
Framework tests verify core Laravel integration points:
- ServiceProviderTest: app boot, guard resolution, route loading, config_cache
- RoutingTest: named routes, duplicates, api/oauth prefixes, middleware groups
- EloquentTest: User/Profile/Status factories, relationships, casts, soft deletes
- QueueTest: job dispatch, serialization, middleware, unique IDs
- ConfigTest: config loading, env overrides, auth/cache/queue settings
- MiddlewarePipelineTest: CSRF, auth, throttle, password confirm, 2FA, admin

Also:
- Add HasFactory trait to Status model
- Fix StatusFactory: remove non-existent 'place' column, add 'rendered' field
- Add Api/AccountTest for account endpoint coverage (254 total tests)
4 weeks ago
Your Name 8a2649b3ff feat: add critical path test suite and fix auth/config issues
Test Infrastructure:
- Modernize phpunit.xml (bootstrap, source block, Laravel 12 env vars)
- Configure tests/Pest.php with pest()->extend(TestCase::class)->in('Feature')
- Add docker-compose.test.yml (Redis for test suite)
- Add composer test/test:quick scripts
- Rename CACHE_DRIVER to CACHE_STORE across config (backwards compatible)
- Update .env.testing for in-memory SQLite + Docker Redis

Test Coverage (190 tests):
- CriticalRoutes: public routes, auth routes, API endpoints, middleware, schedule
- Auth/LoginTest: login, logout, rate limiting, redirect behavior
- Auth/RegisterTest: registration flow, validation, disabled registration
- Auth/PasswordResetTest: reset request, token validation, password update
- Auth/TwoFactorTest: 2FA checkpoint, setup behind password confirmation
- Auth/PasswordConfirmationTest: sudo mode flow via Laravel password.confirm
- Api/ScopeTest: scope enforcement, public endpoints, admin access

Bugs Fixed:
- Fix unauthenticated API returning 500 instead of 401 (AuthenticationException
  not handled in custom exception renderer in bootstrap/app.php)
- Replace custom DangerZone middleware with Laravel password.confirm
- Add HasFactory trait to Profile model for test factories

Bugs Documented (known-bugs group):
- Registration crashes with str_ends_with TypeError (RegisterController:82)
- OAuth routes use legacy array syntax causing ReflectionFunction TypeError
4 weeks ago