Commit Graph

279 Commits (e18475f9d0bb1860863e7154ae16fde5b1ac2a0f)

Author SHA1 Message Date
Your Name edde5b985f polish 1 week ago
Your Name d0f056058b polish 1 week ago
Your Name 566c5503d3 polish 1 week ago
Your Name ababab30ed polish 1 week ago
Your Name 163cd9f589 polish 1 week ago
Shlee 79ad664159
Update ImageThumbnailSupersedeTest.php 1 week ago
Your Name ddc617a8d2 Install libvips on CI runners and test on the vips driver
The vips driver uses jcupitt/vips (FFI binding), which needs ext-ffi
plus the libvips shared library at runtime - not the PECL vips
extension. Add a libvips apt install step and enable ffi in both test
workflows, then switch .env.testing to vips so CI exercises the new
default driver.

Guard ImageThumbnailSupersedeTest to skip when the configured driver's
runtime is unavailable, so contributors without libvips are not blocked.
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 7b11b72e1d test(federation): run AP delivery tests in production env
ActivityPubDeliveryService::pool() and queueDelivery() only perform HTTP
delivery when app()->environment('production'); outside production they log
and return. The pool/job delivery tests were written before that guard was
added (commit 868e09b64) and never forced production, so no requests were
made and every assertSent/assertSentCount failed (6 failing tests).

Wrap the delivery-exercising tests in a forged production environment
(restored afterwards) and seed the public-ips DNS cache plus an empty
banned-domains cache so validateDestination() passes without a real DNS
lookup or DB query. Seed after factory creation, since the lazy DB refresh
can flush the cache store.

Also fix a by-value capture bug in the onError assertions: the $errors
array was captured through an arrow-fn wrapper, so the inner callback's
by-reference mutations never reached the assertion. Use a regular closure.

No production code changed; the production delivery gate is intended
behavior.
1 week ago
Your Name 729396302a fix(federation): swallow ConnectionException on synchronous AP delivery
queueDelivery() runs synchronously from the v1 follow/unfollow endpoints
(via Helpers::sendSignedObject), which commit local state before delivery
and have no try/catch. After the Http::send() rewrite, a ConnectionException
from a momentarily-unreachable remote was rethrown out of queueDelivery(),
turning a best-effort delivery into a 500 for the user after the follow/
unfollow was already persisted. For unfollows, a retry then hit the
isFollowing==false branch and never re-sent the Undo, diverging state.

Treat transport failures (ConnectionException) as best-effort on this
single-delivery path: log, record host health, and return without
propagating. Other exception types (invalid sender/destination, signing,
serialization) still throw, matching pre-rewrite precondition behavior.

Also widen SendUpdateActor's per-user catch from HttpException to Throwable
so a single bad host no longer aborts a fleet-wide actor update (the old
HttpException catch is dead for ConnectionException/invalid-destination).
1 week ago
Your Name 8a4567a5c2 Isolate fanout delivery failures from StatusDelete local cleanup 1 week ago
Shlee a1abf10010
Merge pull request #7254 from pixelfed/fix/oidc-dangerzone-lockout
Mark OIDC login session password-confirmed to fix dangerzone lockout
1 week ago
Your Name fbca487bcd Mark OIDC login session password-confirmed to fix dangerzone lockout 1 week ago
Shlee 78447646b8
Merge pull request #7253 from pixelfed/fix/remote-update-media-validate-before-orphan
Validate remote update attachments before detaching existing media
1 week ago
Your Name 9b829ca56e Validate remote update attachments before detaching existing media 1 week ago
Shlee 1d7ee48f2e
Merge pull request #7252 from pixelfed/fix/v2-media-can-post-role
Enforce can-post role check on POST /api/v2/media
1 week ago
Your Name 3a23606573 Enforce can-post role check on POST /api/v2/media 1 week ago
Shlee a510682122
Merge pull request #7251 from pixelfed/fix/delete-account-purge-status-edits
Purge status_edits on account and status deletion
1 week ago
Your Name 60284a871e Purge status_edits on account and status deletion 1 week ago
Your Name 7b90bc8699 Fix remove-all follower purge chunkById key and gate the route behind dangerzone 1 week ago
Your Name cfbdabdd61 Send verification email for admin-invite users that require verification 1 week ago
Shlee 1fffdef464
Merge pull request #7247 from pixelfed/fix/report-object-id-integer-validation
Validate report object_id as a positive integer to fix 500
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 fe382bdb86 Extend story author-key TTL instead of overwriting so it survives to the longest-lived story 1 week ago
Shlee 2f9f8ecd1b
Merge pull request #7244 from pixelfed/fix/curated-register-details-xss
Escape message in curated register details email to fix reflected XSS
1 week ago
Your Name 623f03bb68 Escape message in curated register details email to fix reflected XSS 1 week ago
Shlee 88137649a3
Merge pull request #7242 from pixelfed/fix/home-timeline-null-account
Guard home timeline filter against null account
1 week ago
Shlee 589e9bef9e
Merge pull request #7241 from pixelfed/fix/status-delete-notification-cache
Invalidate notification cache when deleting a status
1 week ago
Your Name b13c374f21 Guard home timeline filter against null account 1 week ago
Your Name f1e4536d19 Invalidate notification cache when deleting a status 1 week ago
Your Name ac872c12ed Use absolute path for /horizon dashboard redirect 1 week ago
Your Name 9d839f7b5a Fix missing email verification dispatch on settings email change 2 weeks ago
Your Name c9c897c4e7 Fix stale-CSRF login recovery render callback 2 weeks ago
Daniel Supernault 9c39eaaf9d
Delete NotificationEpochFallbackTest.php 2 weeks ago
Your Name ed71baaab3 Add notification epoch inline fallback test (#7162)
getEpochId() now computes a bounded epoch inline on cache miss (oldest
notification within the window) instead of returning 1, which would turn
every notification query into a full-table scan until the async pipeline
repopulates the cache. Adds coverage for the recent-id fallback and the
no-recent-notifications case. (Code change committed alongside the #7195
NotificationService edits.)
2 weeks ago
Your Name c0f29d4a4b Fix web notifications not loading (#7195)
Notification status hydration compared item_type strictly against
Status::class (App\Models\Status). Rows created before the App\ ->
App\Models\ namespace migration store the legacy 'App\Status' morph-map
alias, so the comparison failed and favourite/comment/mention
notifications came back with no attached status. The web UI filters those
out client-side but keeps paginating (response never empty), leaving the
infinite-scroll loader spinning forever.

- NotificationTransformer + Mastodon NotificationTransformer: match both
  the legacy alias and the current FQCN when hydrating status.
- NotificationService::buildNotification: same alias-aware deleted-item guard.
- NotificationService::getMaxPage/getMinPage: filter out unrenderable
  notifications (status-type without a hydrated status) so the endpoint
  never returns rows the UI discards, fixing pagination termination; warn
  on unexpected notification types.
- Tests for transformer hydration (legacy + current), renderable filtering,
  the unexpected-type warning, and pagination termination.
2 weeks ago
Your Name 6ffdc53dee polish 2 weeks ago
Your Name 341351c47e Remove sha256 verification from MediaMoveStorageLocalToCloud
original_sha256 is the pre-optimization upload hash and can never match the
optimized local file, so comparing against it is not a valid integrity
check for migration. Drop the --verify-sha256 option and the checksum step
entirely; verify now relies on cloud-object existence and size parity.
2 weeks ago
Your Name 441a94e731 Make original_sha256 verify opt-in in MediaMoveStorageLocalToCloud
original_sha256 is the hash of the file as originally uploaded, but the
async optimize pipeline (ImageResize/ImageUpdate) rewrites the local file
in place and never updates that column. Verifying the current local bytes
against it made every optimized image fail with sha256_mismatch, so the
migration reported moved=0 and exited 1.

Add a --verify-sha256 flag (off by default) that gates the checksum step.
By default verify relies on cloud-object existence and size parity, which
is the only signal that actually describes the uploaded copy. Add tests
covering both the default (migrates) and opt-in (fails) paths.
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 07367c4ea2
Update UserStorageServiceTest.php 2 weeks ago
Your Name 888fa1bc30 Fix tests 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 255bdaa2a0 Use LazilyRefreshDatabase instead of plain RefreshDatabase in tests
Aligns with the app's dominant convention (84 files vs 10). Avoids
running migrations for tests that never touch the database.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 weeks ago
Shlee 84df3de562
Update StoryExpireRemoteCacheTest.php 2 weeks ago
Daniel Supernault 7a5192481c
Fix StoryExpireRemoteCacheTest 2 weeks ago
Your Name ce073ffc92 Merge remote-tracking branch 'origin/staging' into feature/honeypot-spam-protection
# Conflicts:
#	routes/web.php
2 weeks ago
Your Name 08a442e661 Rewrite 2FA tests for the pending-login refactor
The 2FA flow moved from a middleware-gated i/auth/checkpoint model to a
pending-login model (auth.pending session, POST /login/2fa, /login?step=2fa
challenge). The old tests referenced the removed route and dead session keys
(2fa.session.active, 2fa.attempts) and failed with 404s.

Rewritten against the new code as source of truth:
- Checkpoint test: throttle assertion retargeted to the login/2fa route;
  failed-verification audit log now driven through a pending 2FA session.
- Logout-session test: asserts auth.pending is cleared and the user stays a
  guest after MAX_2FA_ATTEMPTS failures (replacing the old flag cleanup).
- TwoFactorTest: challenge-redirect and challenge-page cases rewritten around
  the login flow; setup/recovery password-confirmation cases unchanged.
- MiddlewarePipelineTest: 2FA is enforced at login, not per-request, so an
  authenticated 2FA user browses normally.

Full suite: 715 passed.
2 weeks ago