Files
magpie/internal/mcpauth
yetone c83f8d4bbe mcpauth: a firewall's 403 says it turned the request away, not "says nothing of a sign-in"
fremontdango (Discord #feedback) got "the server answered 403 and says
nothing of a sign-in" from SOFA (agents.stackoverflow.com/mcp). From here
the same URL answers 401 with resource metadata, an S256 authorization
server and registration, so the 403 came from a firewall (Cloudflare) in
front of it judging their network. The old message read as SOFA having
no sign-in.

discover() now tells a firewall's 403 (an HTML page to a JSON-RPC
request, or Cf-Mitigated) apart from the server's own: ErrTurnedAway
says a firewall turned the request away and to try another network or a
proxy in Settings. A JSON 403 from the server keeps the old wording. The
four translations live in core i18n.js since the backend says the line.

Run:
- go test ./internal/mcpauth ./internal/gui ./internal/library: ok.
  TestFirewallTurnedAway (Cloudflare HTML, Cf-Mitigated, server JSON 403)
  is red with turnedAway returning false.
- go vet GOOS=darwin and windows: ok.
- GUI: i18n-keys, mcp-signin, mcp-oauth-app, both engines: 32 pass.
  mcp-signin's new sofa case is red in zh without the translation.
- Broad library-*/mcp-* GUI run: only library-row-remove red, which is
  red alone on origin/main eee571999 (#3099).
Not tried: a real request from a network Cloudflare blocks.
2026-10-27 06:25:12 +08:00
..