Skip to content

mcp: restrict HTTP client redirects to same origin to prevent cross-origin redirect - #1440

Merged
guglielmo-san merged 2 commits into
mainfrom
guglielmoc/do_not_allow_redirect
Oct 23, 2026
Merged

guglielmo-san merged 2 commits into
mainfrom
guglielmoc/do_not_allow_redirect

Conversation

@guglielmo-san

Copy link
Copy Markdown
Contributor

Fixes #1429

@jeongukjae

Copy link
Copy Markdown
Contributor

thanks, seems great

@guglielmo-san
guglielmo-san merged commit 2e00768 into main Oct 23, 2026
10 checks passed
@guglielmo-san
guglielmo-san deleted the guglielmoc/do_not_allow_redirect branch October 23, 2026 15:48
Tangerg added a commit to Tangerg/go-sdk that referenced this pull request Nov 5, 2026
Sync 109 upstream commits through f91620f, including the same-origin
redirect restriction (modelcontextprotocol#1440), linear-time WWW-Authenticate parsing
(modelcontextprotocol#1456), OIDC issuer validation (modelcontextprotocol#1442), per-listen notification (modelcontextprotocol#1490)
and caller-params preservation (modelcontextprotocol#1473).

The fork keeps its own module path, exact encoded-JSON Meta, strict
ResourceContents encoding and the transport cancellation and frame budget
fixes. Upstream tests that used map-based Meta read it through
decodeMetaValue. The protocol number precision suite from the retired
preserve-protocol-json-numbers branch now guards the exact-number
contract against future syncs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: HTTP client transports follow redirects outside the endpoint origin

3 participants