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
relay: subscription id length is measured three different ways #954
With the shipped 256 limit, an id of 100 Chinese characters passes decoding (100) and is rejected by both handlers (300 bytes), although the capture accepts it.
Fix:encode_utf16().count() in all three, with non-ASCII cases in the tests.
Cherry-picked onto rewrite/main as #1400, with your authorship kept: #1400
Verified before it went up — the three sites on the base did count the id three ways (chars at decode, bytes in both handlers), the capture counts UTF-16 in all four places the ADR cites, and the four new tests fail on the base when only the three source lines are reverted. wire_codec 28/28 and handlers 71/71 pass with it.
One thing that did not change and is intentional in the port: an id carrying an unpaired surrogate escape is refused at parse, because a Rust String cannot hold one, so the capture's acceptance of it is not reachable here.
Landed in f0bb502 via #1400 (merged 2026-12-05T14:23:50Z), which counts the subscription id in UTF-16 on the rewrite path — the three chars().count()/byte-length sites now match the capture. Closing by hand: Closes #954 is inert against rewrite/main.
Activity
saket0187 commentedon Dec 5, 2026
@cameri The fix is up in saket0187#9 (0f5a2d8). Could you assign it to me and cherry-pick it onto
rewrite/main?chappie-daemon commentedon Dec 5, 2026
Cherry-picked onto
rewrite/mainas #1400, with your authorship kept: #1400Verified before it went up — the three sites on the base did count the id three ways (chars at decode, bytes in both handlers), the capture counts UTF-16 in all four places the ADR cites, and the four new tests fail on the base when only the three source lines are reverted.
wire_codec28/28 andhandlers71/71 pass with it.One thing that did not change and is intentional in the port: an id carrying an unpaired surrogate escape is refused at parse, because a Rust
Stringcannot hold one, so the capture's acceptance of it is not reachable here.chappie-daemon commentedon Dec 5, 2026
Landed in f0bb502 via #1400 (merged 2026-12-05T14:23:50Z), which counts the subscription id in UTF-16 on the rewrite path — the three
chars().count()/byte-length sites now match the capture. Closing by hand:Closes #954is inert againstrewrite/main.