Commit Graph

12 Commits (aef69c04b4227da3fb4e1b8c3f2af0d537a0eef7)

Author SHA1 Message Date
Your Name d51cf4ccc9 Fix isDomainCompatible throwing on non-json beagle response 3 weeks ago
Your Name 2ad6e28318 Add timeout, retry and error handling to remote auth HTTP calls
RemoteAuthService::getVerifyCredentials, getFollowing and getToken made
outbound HTTP requests to a user-controlled remote instance during the
Mastodon login flow with no timeout, no retry and no exception handling.
A slow or hostile instance could hang the request or surface an uncaught
exception.

Wrap all three in timeout(20)->retry(3, 750) with try/catch that returns
false on failure, matching the existing pattern in isDomainCompatible().
Callers already treat a falsy return as a failure; add the missing guard
at the one verify_credentials call site that accessed the result array
without checking it first.

Adds RemoteAuthServiceTest covering connection failure, server error and
success paths.
4 weeks ago
Your Name a187ab6639 Refactor profile count reconciliation into shared AccountStatService methods
Extract canonical source-of-truth count logic into AccountStatService:
recalculateStatusCount/FollowerCount/FollowingCount and a
reconcileProfileCounts() that fixes only drifted columns and busts caches.

Both the scheduled app:account-post-count-stat-update (status-only, its
correct scope) and fix:profilecounts now use these instead of duplicating
the SQL. Also corrects the status_count definition to match the actual
increment logic in StatusEntityLexer/StatusDelete (media post types only:
photo/video albums), rather than the previous inconsistent all-statuses /
scoped counts that could themselves cause drift.

The scheduled updater keeps its incremental, dirty-set design and remains
status-only; follower/following stay owned by FollowServiceWarmCache.
1 month ago
Daniel Supernault 53742fa699
Lint 9 months ago
Your Name ca6c875bbb Fix PHPStan class.notFound issues 11 months ago
Daniel Supernault 806e210f13
Update snowflake config, allow custom datacenter/worker ids 2 years ago
Daniel Supernault 134eb6324e
Update AccountPostCountStatUpdate, fix memory leak 2 years ago
Daniel Supernault b81ae5773f
Update AP helpers, refactor post count decrement logic 3 years ago
Daniel Supernault 7caed381fb
Update AP helpers, more efficently update post counts 3 years ago
Daniel Supernault acabf603f0
Update Remote Auth feature, fix custom domain bug and enforce banned domains 3 years ago
Daniel Supernault 45b9404ec1
Add Sign-in with Mastodon 3 years ago
Daniel Supernault a2305d5fdc
Added `/api/v1.1/accounts/app/settings` endpoint and UserAppSettings model to store app specific settings 3 years ago