session/sasl: send gs2 n on the browser's wss:// #3
Loading…
Reference in a new issue
No description provided.
Delete branch "asxpi/libtacky:fix/browser-gs2-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The web client cannot sign in to another.im: every SCRAM login is answered with
<failure><text>Invalid channel binding</text><not-authorized/></failure>.Reported by qaios in Mattermost: https://wsg.rxtx.cx/anotherim/pl/7sp9jxegfjr47ywen15fg449sw
Cause
Since
4800b462every encrypted stream counts as one that can bind, so a SCRAM login not offered-PLUSsends gs2y. In the browser build the stream is the page'swss://. The browser runs that TLS, names no TLS version and gives the page no channel binding, so the client cannot bind at all. RFC 5802 §6 reservesyfor a client that could bind. ejabberd behind a TLS proxy treats it as a downgrade and refuses the login.From the HAR in the report: the server offers
PLAIN SCRAM-SHA-1 X-OAUTH2(no-PLUS), and the client-first message decodes toy,,n=….Fix
sasl.tcl: newOwnTls. A stream counts as bindable only when this client runs its TLS itself, which the link shows by naming a TLS version. The browser'swss://sendsn, and native streams keep the downgrade protection of4800b462.fast.tcl:Requestapplies the same test, so the browser still asks for anHT-SHA-256-NONEtoken when-ENDPis offered instead of asking for none.Testing
policy-gs2-flagsandht-token-requests-prefer-the-strongest-bindingeach gain a browser case (encrypted, emptytls_version).docker/run.sh(linux image): 311 passed, 0 failed, 9 skipped.dist/webbuilt against this branch on rc3 (2c6be166) signs in to another.im with gs2n→<success/>in Chromium, Firefox, Firefox ESR and Epiphany.Not in this PR
t=would still fail in the browser, because the browser link has no TLS version to compare. No server sends it today.🤖 Generated with Claude Code
The OMEMO 2 errors mentioned under "Not in this PR", from the same test session (2026-10-14). They are unrelated to this fix; I'm recording them here for a follow-up issue.
rc3 (
2c6be166+ this branch), web client in Chromium and the 0.4.7 AppImage, 28 warnings, all for the same 7 devices ofasx@another.im(1484, 2014, 2294, 5689, 9026, 12559, 14459):The AppImage logged the same lines while fetching those bundles from two other accounts on other servers. So the bundles as published are bad, whichever account reads them.
beta7 (
8c3fa4d5), web client in Chromium: the same 7asx@another.imdevices plus 18 ofann@another.im. beta7 couldn't name the cause yet:ann's bundles weren't fetched in the rc3 session, so I don't know whether the same diagnosis covers them.
Some client is putting its 0.3 (Curve25519,
0x05-prefixed) identity key into theurn:xmpp:omemo:2:bundlesnode instead of the Ed25519 one. Those devices can't take part in OMEMO 2 sessions. I haven't checked which client published them; it might be an older anotherim/libtacky build.Merged into develop by hand as
66283e0a(release/rc5), in v1.0.0-rc5 (d1cca8e5). Reviewed: the fix is right, a stream counts as bindable only when this client runs its TLS; both tests kept.Pull request closed