Skip to content

Handle server-prefixed AUTHENTICATE in SASL dispatcher#20

Merged
silverbucket merged 1 commit into
masterfrom
authenticate-prefix
Apr 17, 2026
Merged

Handle server-prefixed AUTHENTICATE in SASL dispatcher#20
silverbucket merged 1 commit into
masterfrom
authenticate-prefix

Conversation

@silverbucket

Copy link
Copy Markdown
Owner

Fixes #19.

Summary

  • startupHandler matched AUTHENTICATE only on parts[0], so server-prefixed lines (e.g. Ergo's :ergo.test AUTHENTICATE +) were ignored and the SASL handshake stalled until the caller timed out.
  • Mirrors the existing CAP / NOTICE pattern: match on parts[0] or numeric (= parts[1]), and read the payload from parts[2] when the line is prefixed.
  • No other branches change — CAP, NOTICE, and numerics already handle prefixes correctly.

Test plan

The startup handler matched AUTHENTICATE on parts[0], ignoring lines
carrying an RFC 1459 :prefix (e.g. Ergo's ':ergo.test AUTHENTICATE +').
When prefixed, the SASL handshake stalled until the caller's timeout
tripped. Mirror the CAP/NOTICE pattern and read the payload argument
from parts[2] when the command sits at parts[1].

Fixes #19
@silverbucket
silverbucket merged commit 8a81a38 into master Apr 17, 2026
3 checks passed
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.

AUTHENTICATE parser does not handle server prefix (stalls SASL handshake against Ergo)

1 participant