You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moq-net: a session closed with MALFORMED_AUTH_TOKEN (0x16) reports "unknown code=22" #6567
When a moq-transport peer closes the session with MALFORMED_AUTH_TOKEN (0x16), moq reports unknown code=22.
SessionError::from_code (rs/moq-net/src/error.rs), which moq-transport closes decode through (coding/codes.rs), maps its neighbours 0x13 AUTH_TOKEN_CACHE_OVERFLOW, 0x17 UNKNOWN_AUTH_TOKEN_ALIAS and 0x18 EXPIRED_AUTH_TOKEN, but has no arm for 0x16, so it falls through to Unknown(22).
Seen against moqx v0.3.6 on drafts 16 and 18: given a token as text (a JWT, or a CAT in base64) in SETUP's Token Type 0, where it parses the bytes as a CWT, moqx closes with 0x16, and moq (#6177's branch at 9425db1; from_code is the same on main1582fdc) prints unknown code=22. Decoded, the client could say its token was malformed, which points at the token's format rather than at its grant.
Suggest a SessionError::MalformedAuthToken on 0x16 beside UnknownAuthTokenAlias, added to the round-trip table in the test. If leaving it unknown is deliberate, as it is for the request code (ietf/error.rs: "a peer's MALFORMED_AUTH_TOKEN stays remote"), a line at from_code saying so would settle it.
Decision: add SessionError::MalformedAuthToken = 0x16 beside UnknownAuthTokenAlias, round-tripped in Rust and js/net, added to moq-lite's session-code table, and sent by moq-net where it refuses a token it can't parse (well-formed tokens that grant nothing stay Unauthorized).
Planned in #6580 as quest/m0/malformed-auth-token-code.md.
Activity
kixelated commentedon Oct 23, 2026
Decision: add
SessionError::MalformedAuthToken= 0x16 besideUnknownAuthTokenAlias, round-tripped in Rust andjs/net, added to moq-lite's session-code table, and sent by moq-net where it refuses a token it can't parse (well-formed tokens that grant nothing stayUnauthorized).Planned in #6580 as
quest/m0/malformed-auth-token-code.md.(Written by Claude Opus 5.5)