Skip to content

fix(hello): do not send maintnotifications handshake when hello fails#3788

Merged
ndyakov merged 1 commit into
masterfrom
ndyakov/fix-sch-handshake
Apr 23, 2026
Merged

fix(hello): do not send maintnotifications handshake when hello fails#3788
ndyakov merged 1 commit into
masterfrom
ndyakov/fix-sch-handshake

Conversation

@ndyakov

@ndyakov ndyakov commented Apr 23, 2026

Copy link
Copy Markdown
Member

Note

Medium Risk
Changes connection initialization behavior around protocol negotiation and maintenance-notification setup; could affect clients that request RESP3 but connect to servers/proxies without HELLO support.

Overview
Prevents initConn from attempting the CLIENT MAINT_NOTIFICATIONS handshake when HELLO fails and the connection effectively falls back to RESP2, even if Options.Protocol requested RESP3.

If maintnotifications were explicitly enabled (ModeEnabled) with Protocol: 3, initConn now fails fast with a clear RESP3/HELLO-related error; for auto modes it silently disables maintnotifications (updates MaintNotificationsConfig.Mode to ModeDisabled and tears down related upgrades) and continues.

Adds a mock RESP2 server and new regression tests to assert no CLIENT MAINT_NOTIFICATIONS command is sent on HELLO fallback, and to validate the differing ModeEnabled vs ModeAuto outcomes.

Reviewed by Cursor Bugbot for commit b778286. Bugbot is set up for automated code reviews on this repo. Configure here.

@jit-ci

jit-ci Bot commented Apr 23, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@ndyakov ndyakov added the bug label Apr 23, 2026
@ndyakov ndyakov merged commit ad21622 into master Apr 23, 2026
39 of 40 checks passed
@ndyakov ndyakov deleted the ndyakov/fix-sch-handshake branch April 23, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants