Skip to content

[ISSUE #10832] fix(remoting): reject malformed command frames - #10842

Open
yuluo-yx wants to merge 1 commit into
apache:developfrom
yuluo-yx:0808-yuluo/fix-4
Open

[ISSUE #10832] fix(remoting): reject malformed command frames#10842
yuluo-yx wants to merge 1 commit into
apache:developfrom
yuluo-yx:0808-yuluo/fix-4

Conversation

@yuluo-yx

@yuluo-yx yuluo-yx commented Aug 8, 2026

Copy link
Copy Markdown
Member

Which Issue(s) This PR Fixes

Brief Description

Reject short command frames and unknown serialization types with RemotingCommandException instead of unchecked exceptions.

How Did You Test This Change?

  • mise x java@temurin-17 -- mvn -pl remoting -am -Dtest=RemotingCommandTest -Dsurefire.failIfNoSpecifiedTests=false test

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.31%. Comparing base (fd0c959) to head (4b85579).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10842      +/-   ##
=============================================
- Coverage      48.37%   48.31%   -0.06%     
+ Complexity     13555    13537      -18     
=============================================
  Files           1380     1380              
  Lines         101165   101170       +5     
  Branches       13127    13129       +2     
=============================================
- Hits           48940    48884      -56     
- Misses         46250    46300      +50     
- Partials        5975     5986      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good input validation for RemotingCommand deserialization — rejecting negative opaque, out-of-range version, and negative flag values prevents malformed frames from being processed silently. The NumberFormatException handling for the optional flag field is correct.


Automated review by github-manager-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RemotingCommand.decode throws unchecked exceptions for malformed frame headers

3 participants