Commit Graph

8 Commits (ca5d9f3db5da0bbefdf1d5122438f86ef7c9cf9c)

Author SHA1 Message Date
Your Name ca5d9f3db5 MultiExceptionCatchRector 6 days ago
Your Name 8dcdd93e2b RemoveUnusedVariableInCatchRector 6 days ago
Your Name d51cf4ccc9 Fix isDomainCompatible throwing on non-json beagle response 2 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.
3 weeks ago
Daniel Supernault 53742fa699
Lint 9 months ago
Your Name ca6c875bbb Fix PHPStan class.notFound issues 11 months 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