Skip to content

Commit 9060ac0

Browse files
committed
Fix BOM, CRLF line endings, and escaped quotes in url_validators
1 parent fb893dd commit 9060ac0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/mcp/server/auth/url_validators.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
\"\"\"OAuth 2.0 URL validation helpers for MCP authorization servers.
1+
"""OAuth 2.0 URL validation helpers for MCP authorization servers.
22
33
RFC 9700 4.1.1 and RFC 7591 2 require HTTPS for authorization endpoint URLs
44
and registered redirect_uris, with an HTTP loopback exception for local
55
development.
6-
\"\"\"
6+
"""
77

88
from pydantic import AnyHttpUrl
99

1010

1111
def validate_issuer_url(url: AnyHttpUrl):
12-
\"\"\"Validate that the issuer URL meets OAuth 2.0 requirements.
12+
"""Validate that the issuer URL meets OAuth 2.0 requirements.
1313
1414
Args:
1515
url: The issuer URL to validate.
1616
1717
Raises:
1818
ValueError: If the issuer URL is invalid.
19-
\"\"\"
19+
"""
2020
if url.scheme != "https" and url.host not in ("localhost", "127.0.0.1", "[::1]"):
2121
raise ValueError("Issuer URL must be HTTPS")
2222

@@ -27,7 +27,7 @@ def validate_issuer_url(url: AnyHttpUrl):
2727

2828

2929
def validate_redirect_uri(url: AnyHttpUrl):
30-
\"\"\"Validate a registered redirect_uri for DCR.
30+
"""Validate a registered redirect_uri for DCR.
3131
3232
RFC 9700 section 4.1.1 and RFC 7591 section 2 require HTTPS for
3333
redirect_uris, with an HTTP loopback exception for local development.
@@ -38,7 +38,7 @@ def validate_redirect_uri(url: AnyHttpUrl):
3838
Raises:
3939
ValueError: If the redirect URI uses an unsafe scheme or contains
4040
a fragment.
41-
\"\"\"
41+
"""
4242
if url.scheme != "https" and url.host not in ("localhost", "127.0.0.1", "[::1]"):
4343
raise ValueError("Redirect URI must use HTTPS (or HTTP loopback for local development)")
4444

0 commit comments

Comments
 (0)