Skip to content

fix(model): reject malformed JSON-RPC messages with conflicting result and error fields (#1283) - #1287

Open
ump45nose wants to merge 2 commits into
modelcontextprotocol:mainfrom
ump45nose:contrib/193343ca37c2
Open

ump45nose wants to merge 2 commits into
modelcontextprotocol:mainfrom
ump45nose:contrib/193343ca37c2

Conversation

@ump45nose

Copy link
Copy Markdown
Contributor

Summary

fix(model): reject malformed JSON-RPC messages with conflicting result and error fields (#1283)

Verification

cargo test -p rmcp --lib (205 passed; includes test_response_with_result_and_error_is_rejected, test_request_with_stray_result_or_error_is_rejected, and test_clean_shapes_and_extension_fields_still_deserialize)

Related to #1283

AI assistance disclosure: AI was used to discover this opportunity and draft the change or text. The submission was checked against the prepared artifact and recorded verification evidence.

@ump45nose
ump45nose requested a review from a team as a code owner September 20, 2026 02:34
@github-actions github-actions Bot added the T-core Core library changes label Sep 20, 2026
Keep the public Deserialize impl equivalent to the previous derive
(Deserialize<'de> bounds, Noti type param) so cargo public-api --deny
removed passes, while still rejecting conflicting result/error fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant