Repository navigation
fix(sdk): the Rust SDK reads at most 64 KiB of a back-channel logout request - #567
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
marked this pull request as ready for review
November 20, 2026 07:33
PiquelChips
marked this pull request as draft
November 21, 2026 14:00
…request The Rust SDK's back-channel logout route read up to axum's default 2 MB form, while the TypeScript SDK stops at 64 KiB: a logout token is at most 16 KiB. The route now has a 64 KiB body limit, and a larger request is answered like a malformed one, 400 with invalid_request. Closes #549
PiquelChips
force-pushed
the
fix/549-logout-body-limit
branch
from
November 21, 2026 14:05
ad03d24 to
bb02126
Compare
PiquelChips
marked this pull request as ready for review
November 21, 2026 14:09
PiquelChips
enabled auto-merge
November 21, 2026 14:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An app using the Rust SDK read a back-channel logout request whole, up to axum's default 2 MB form limit, before refusing the token. The TypeScript SDK stops at 64 KiB, since a logout token is at most 16 KiB.
The Rust route now stops at 64 KiB too, with a
DefaultBodyLimiton that route only. A larger request gets the same answer as a malformed one, and the same answer the TypeScript SDK gives: 400 with{"error":"invalid_request"}andCache-Control: no-store. The handler never sees it.The limit is
MAX_LOGOUT_REQUEST_BYTESinsourceorigin_common::protocol::constants(4 * MAX_TOKEN_BYTES), which both SDKs now read: the TypeScript SDK's ownMAX_LOGOUT_REQUESTcopy is gone, andprotocol.tsis regenerated.backchannel_logout_refuses_large_requestsposts a valid token padded to 1 MB (400, handler not called), then a normal one (200). Without the fix it fails, because the padded request gets a 200.Closes #549
Note
Written by Claude Opus 5.5 in Claude Code and reviewed by GPT 6.1 Sol (via T3 Code)