We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb3b500 commit a96218dCopy full SHA for a96218d
src/mcp/client/auth/utils.py
@@ -259,7 +259,7 @@ def is_valid_client_metadata_url(url: str | None) -> bool:
259
try:
260
parsed = urlparse(url)
261
return parsed.scheme == "https" and parsed.path not in ("", "/")
262
- except Exception: # pragma: no cover
+ except Exception:
263
return False
264
265
tests/client/test_auth.py
@@ -1851,6 +1851,8 @@ class TestCIMD:
1851
# Invalid URLs - None or empty
1852
(None, False),
1853
("", False),
1854
+ # Invalid URLs - malformed (triggers urlparse exception)
1855
+ ("https://[invalid-ipv6]:8080/path", False),
1856
],
1857
)
1858
def test_is_valid_client_metadata_url(self, url: str | None, expected: bool):
0 commit comments