File tree Expand file tree Collapse file tree 2 files changed +0
-13
lines changed
src/mcp/server/mcpserver/resources
tests/server/mcpserver/resources Expand file tree Collapse file tree 2 files changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,6 @@ def git_diff(range: str) -> str: ...
5454 exempt_params : Set [str ] = field (default_factory = frozenset [str ])
5555 """Parameter names to skip all checks for."""
5656
57- def __post_init__ (self ) -> None :
58- # Coerce to frozenset so the dataclass stays hashable even if
59- # callers pass a regular set.
60- object .__setattr__ (self , "exempt_params" , frozenset (self .exempt_params ))
61-
6257 def validate (self , params : Mapping [str , str | list [str ]]) -> str | None :
6358 """Check all parameter values against the configured policy.
6459
Original file line number Diff line number Diff line change @@ -89,14 +89,6 @@ def test_matches_null_byte_check_can_be_disabled():
8989 assert t .matches ("file://docs/key%00.txt" ) == {"name" : "key\x00 .txt" }
9090
9191
92- def test_resource_security_hashable_with_regular_set ():
93- # Frozen dataclass auto-generates __hash__ from all fields, so a
94- # mutable set would make the instance unhashable. __post_init__
95- # coerces to frozenset.
96- policy = ResourceSecurity (exempt_params = {"a" , "b" })
97- assert hash (policy ) == hash (ResourceSecurity (exempt_params = frozenset ({"a" , "b" })))
98-
99-
10092def test_security_rejection_does_not_fall_through_to_next_template ():
10193 # A strict template's security rejection must halt iteration, not
10294 # fall through to a later permissive template. Previously matches()
You can’t perform that action at this time.
0 commit comments