pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/modelcontextprotocol/python-sdk/pull/2701

s.com/assets/actions-9111c292f95f2fb0.css" /> fix: normalize oauth redirect uri url types by he-yufeng · Pull Request #2701 · modelcontextprotocol/python-sdk · GitHub
Skip to content

fix: normalize oauth redirect uri url types#2701

Open
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/oauth-redirect-uri-url-subtypes
Open

fix: normalize oauth redirect uri url types#2701
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/oauth-redirect-uri-url-subtypes

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • normalize OAuth redirect URI URL objects at the client metadata model boundary
  • keep validation and serialization unchanged while allowing AnyUrl/AnyHttpUrl subtype round-trips to compare correctly
  • add a shared auth regression test for an AnyHttpUrl registration URI checked against an incoming AnyUrl

Fixes #2687

To verify

  • uv run pytest tests/shared/test_auth.py -q
  • uv run ruff check src/mcp/shared/auth.py tests/shared/test_auth.py
  • uv run ruff format --check src/mcp/shared/auth.py tests/shared/test_auth.py
  • uv run pyright src/mcp/shared/auth.py tests/shared/test_auth.py
  • git diff --check

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.

OAuthClientInformationFull.redirect_uris: pydantic strict-type-equality breaks AnyUrl(x) != AnyHttpUrl(x) round-trip

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy