Skip to content

fix: accept empty name-list in KEXINIT (RFC 4251 §5) - #710

Merged
Eugeny merged 1 commit into
Eugeny:mainfrom
lovesegfault:fix-hssh
May 23, 2026
Merged

fix: accept empty name-list in KEXINIT (RFC 4251 §5)#710
Eugeny merged 1 commit into
Eugeny:mainfrom
lovesegfault:fix-hssh

Conversation

@lovesegfault

Copy link
Copy Markdown
Contributor

NameList::from_encoded_string("") previously failed with
Error::CharacterEncoding because "".split(',') yields one empty
element, which the per-name validation rejects.

RFC 4251 §5 permits a zero-length name-list. Servers that only offer
AEAD ciphers (observed: hssh_0.1.0.0) send empty mac_algorithms
fields, and client::connect would fail before the AEAD-needs-no-MAC
fallback in negotiation.rs could fire.

`NameList::from_encoded_string("")` previously failed with
`Error::CharacterEncoding` because `"".split(',')` yields one empty
element, which the per-name validation rejects.

RFC 4251 §5 permits a zero-length name-list. Servers that only offer
AEAD ciphers (observed: hssh_0.1.0.0) send empty `mac_algorithms`
fields, and `client::connect` would fail before the AEAD-needs-no-MAC
fallback in `negotiation.rs` could fire.
@Eugeny
Eugeny merged commit 7f585b5 into Eugeny:main May 23, 2026
11 checks passed
@Eugeny

Eugeny commented May 23, 2026

Copy link
Copy Markdown
Owner

Thank you!

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