Repository navigation
fix(api): answer 401 before looking up the execution on the email-link routes - #594
Merged
Merged
Conversation
…k routes Approve, cancel and revoke by email link need a session on every branch, so a caller without one now gets the same 401 whether or not the execution exists. Before, a missing id gave 404 while an existing one gave 401 (token) or 403 (no token), which let an unauthenticated caller probe for execution ids. Closes #435
Contributor
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 20 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 64 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (7)
Comment |
…ith the 401-first email-link routes The base64 form-body test now signs in so the decoded token still decides the response, the rate-limiter integration test expects 401 for the unauthenticated approve/cancel flood, and the oracle test also covers an invalid bearer and a bogus x-authorization header.
This was referenced Oct 6, 2026
This was referenced Oct 16, 2026
Closed
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.
Closes #435
Approve, cancel and revoke by email link need a session on every branch (the token alone never authorizes). A caller without a session now gets the same 401 before the execution is loaded, so a missing and an existing id are indistinguishable. Before: missing 404; existing 401 (token) or 403 CSRF (no token).
🤖 Generated with Claude Code
Accepted residual (outside #435, which covers the no-session case only): authenticated callers can still see an existence difference, e.g. a session without RBAC or contact-email match gets 404 for a missing id vs 403/409 for an existing one, and a signed-in caller without the CSRF header gets 403 vs 404. A follow-up will be filed.