Skip to content

Handle an Agreed transaction without the options field - #175

Merged
jhalter merged 1 commit into
jhalter:masterfrom
mishan:agreed-without-options
Oct 10, 2026
Merged

jhalter merged 1 commit into
jhalter:masterfrom
mishan:agreed-without-options

Conversation

@mishan

@mishan mishan commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

HandleTranAgreed reads field 113 as a uint16 without checking it's there, so an Agreed sent without it panics with an index out of range.

Since 123d1a3 the per-transaction recover keeps the connection open, but the login stops part-way:

  • the client gets no reply;
  • the other users get no Notify Change User;
  • no banner is sent.

This treats a missing or short options field as no options set, as HandleSetClientUserInfo already does.

Tests: a "without options field" case in TestHandleTranAgreed, which panics without the fix.

HandleTranAgreed read field 113 as a uint16 without checking it was
there, so an Agreed sent without it panicked. The per-transaction
recover keeps the connection, but the login stops short: no reply, no
NotifyChangeUser to the other users, and no banner.

Treat a missing or short options field as no options set, as
HandleSetClientUserInfo already does for clients that don't send it.
@jhalter

jhalter commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix!

@jhalter
jhalter merged commit 1c82494 into jhalter:master Oct 10, 2026
2 checks passed
@mishan
mishan deleted the agreed-without-options branch October 10, 2026 00:41
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.

2 participants