fastmcp/tests/server
Nathan 76f054e957
fix: enforce redirect URI validation when allowed_client_redirect_uris is supplied (#3066)
* fix: enforce redirect URI validation when patterns are explicitly configured

Security fix: When allowed_redirect_uri_patterns is explicitly set, reject redirect URIs that don't match the patterns instead of falling back to parent validation. This prevents unauthorized OAuth clients from bypassing the allowlist and accessing protected resources.

* Update models.py

no need to return twice

* fix redirect uri access issue

* update style

* feat: add unit test to enforce fallback not applied when redirect uri's supplied

* fix: improve test case

* apply linter

* refactor: simplify logic and do not exposed allowed redirect patterns

---------

Co-authored-by: Nathan <2381793w@student.gla.ac.uk>
2026-02-04 17:33:33 -05:00
..
auth fix: enforce redirect URI validation when allowed_client_redirect_uris is supplied (#3066) 2026-02-04 17:33:33 -05:00
http Add loq file size limits and clean up type ignores (#2859) 2026-01-13 07:29:12 -05:00
middleware fix: use MCP spec error code -32002 for resource not found (#3041) 2026-01-31 10:57:05 -05:00
mount Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00
providers Remove OpenAPI timeout parameter, make client optional, surface timeout errors (#3067) 2026-02-03 21:08:09 -05:00
sampling SEP-1577: Sampling with tools (#2551) 2025-12-14 13:51:05 -05:00
tasks feat(context): Add background task support for Context (SEP-1686) (#2905) 2026-02-02 19:28:42 -05:00
telemetry Add component versioning and VersionFilter transform (#2894) 2026-01-16 20:53:18 -05:00
transforms Rename Enabled transform to Visibility (#2950) 2026-01-19 20:46:58 -05:00
versioning Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_app_state.py Update docs and test 2025-06-20 13:06:48 -04:00
test_auth_integration.py Update FastMCP for MCP SDK 1.23.1 auth changes 2025-12-03 11:50:08 -05:00
test_context.py Move session visibility logic to enabled.py (#2924) 2026-01-19 08:29:23 -05:00
test_dependencies.py Fix ty 0.0.14 compatibility and upgrade dependencies (#3027) 2026-01-29 09:10:42 -05:00
test_event_store.py Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
test_file_server.py Add MCP-compliant pagination for list operations 2026-01-17 19:30:24 -05:00
test_icons.py Implement icon support (#2121) 2025-10-17 17:28:08 -04:00
test_input_validation.py Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
test_log_level.py Refactor server.py into mixins (#2939) 2026-01-19 11:36:00 -05:00
test_logging.py Refactor server.py into mixins (#2939) 2026-01-19 11:36:00 -05:00
test_pagination.py Address review feedback: validation and edge cases 2026-01-17 19:50:33 -05:00
test_providers.py Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
test_run_server.py Update tests for prompts 2025-06-04 16:37:41 -04:00
test_server.py Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
test_server_docket.py Make pydocket optional and unify DI systems (#2835) 2026-01-10 16:23:32 -05:00
test_server_lifespan.py fix: broaden combine_lifespans type to accept Mapping return types (#3005) 2026-01-28 15:54:59 -05:00
test_session_visibility.py Rename Enabled transform to Visibility (#2950) 2026-01-19 20:46:58 -05:00
test_streamable_http_no_redirect.py Improve redirect handling to address 307's (#1387) 2025-08-08 11:55:30 -04:00
test_tool_annotations.py Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
test_tool_transformation.py Add enabled field to ToolTransformConfig (#2991) 2026-01-22 17:44:38 -05:00