Skip to content

Close connection when receiving malformed messages#3273

Merged
t-bast merged 1 commit intomasterfrom
disconnect-message-decode-error
Mar 24, 2026
Merged

Close connection when receiving malformed messages#3273
t-bast merged 1 commit intomasterfrom
disconnect-message-decode-error

Conversation

@t-bast
Copy link
Copy Markdown
Member

@t-bast t-bast commented Mar 23, 2026

When receiving a message that we're supposed to be able to decode, for which decoding fails, we must send a warning and close the connection. This ensures that the connection state cannot become corrupted, which may otherwise happen if we fail to deserialize a commit_sig message (for example) and simply ignored it while continuing to process the next messages.

Fixes #3271

When receiving a message that we're supposed to be able to decode, for
which decoding fails, we must send a warning and close the connection.
This ensures that the connection state cannot become corrupted, which
may otherwise happen if we fail to deserialize a `commit_sig` message
(for example) and simply ignored it while continuing to process the
next messages.

Fixes #3271
@t-bast t-bast requested a review from pm47 March 23, 2026 09:16
Copy link
Copy Markdown
Member

@pm47 pm47 left a comment

Choose a reason for hiding this comment

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

LGTM

@t-bast t-bast merged commit fde8de6 into master Mar 24, 2026
1 check passed
@t-bast t-bast deleted the disconnect-message-decode-error branch March 24, 2026 10:03
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.

Malformed messages silently dropped instead of closing connection

2 participants