Port GSA authentication fixes (AltSign PRs #50/#51) to Windows - #51
Port GSA authentication fixes (AltSign PRs #50/#51) to Windows#51shanegillio wants to merge 1 commit into
Conversation
…stut#51 to Windows - Use AuthKit/1 user agent instead of 2019-era akd/1.0 CFNetwork string - Retry GSA requests up to 5 times on HTTP 5xx with 1/2/4/8s backoff, using a fresh http_client per attempt to avoid Apple's edge pinning a failing backend connection - Surface HTTP status, Content-Type, and body snippet when Apple returns a non-plist response instead of a bare InvalidResponse error - Route trusted-device 2FA verify response through the same validation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@shanegillio you closed this the same day you opened it, so I don't know whether you hit a problem with it or just withdrew it — but there's now field evidence that the Windows side really is affected, in case that changes the calculus. Two Windows users confirmed fixed by the User-Agent change alone. I couldn't build for Windows, so instead I patched the string directly in the shipped Results reported back in altstoreio/AltStore#1776:
So the blind spot you inferred from the macOS side is real and reproducible on Windows, and the source-level fix here is what those two users are currently working around with a hex patch. This also covers Linux. One thing worth folding in from upstream, since your PR predates it: @Calvin-Zikakis measured the mechanism in AltSign#51 — Apple's GSA edge allows a fixed number of requests per connection before it 503s, and the User-Agent changes that budget from 2 to 4. To be clear about my own evidence: I confirmed the string change fixes sign-in, on macOS (where I captured Would you consider reopening? |
This ports the GSA sign-in fixes from rileytestut/AltSign#50 and rileytestut/AltSign#51 to AltServer for Windows. The macOS versions were confirmed working against the recent GSA 503 / error-3840 sign-in failures; the Windows code has the same blind spots, so it presumably fails the same way.
Changes (all in
AltSign/AppleAPI+Authentication.cpp)akd/1.0 CFNetwork/978.0.7 Darwin/18.7.0string withAuthKit/1 (Macintosh; OS X 26.5.2) (com.apple.dt.Xcode/26.0), matching AltSign PR Port GSA authentication fixes (AltSign PRs #50/#51) to Windows #51.SendAuthenticationRequestnow retries up to 5 times with 1/2/4/8s backoff. Each attempt constructs a freshhttp_client— the cpprestsdk equivalent of the ephemeralURLSessionin PR Hello, after upgrading to version 26.4 and installing it via a self-signed installer, the app crashes. What could be the reason? #50 — because Apple's GSA edge pins a keep-alive connection to a backend node, and once that node starts 5xx-ing, retries on the same connection never recover.LocalizedAPIErrorinstead of a bareAPIErrorCode::InvalidResponse.Notes for review
1.7.4branch (hence the base). Happy to rebase elsewhere if there's a better target.X-Mme-Client-Infoto a native Windows AuthKit client ID, while the new User-Agent identifies as Xcode on a Mac. If the patched build still hits 503s, that mismatch is the first thing worth investigating.🤖 Generated with Claude Code