issues: record the lowercase authorizationHeader trap from PR #1741 review - #1754
Conversation
…eview authorizationHeadersForAccessToken returns lowercase `authorization` per the Fetch/Headers convention, but the value is typed Record<string, string>, so reading `.Authorization` type-checks, returns undefined, and degrades to whatever fallback the caller wrote. PR #1741 made that mistake twice in one session and both sites were identity-scoping code — the in-flight signed-URL dedupe key collapsed every user onto one key, and the detail-window signature omitted the token it documented as present. Review caught both before merge. Recording the trap so the next person keying identity off that object meets it as a note rather than a defect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ER2xPFzPzoS8fAxkgHC8yo
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:20 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ER2xPFzPzoS8fAxkgHC8yo
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:9a5f79ab13
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Summary
docs/outstanding-issues.md(#285). No code change.authorizationHeadersForAccessTokenreturns{ authorization: 'Bearer …' }— lowercase, per the Fetch/Headers convention (src/lib/supabase/client.tsx:82). The value is typedRecord<string, string>, so reading.Authorizationoff it type-checks, returnsundefined, and silently degrades to whatever fallback the caller wrote.use-signed-image-url.tscollapsed every user ontoendpoint + '', so an account switch with a request in flight could hand user B user A's signed URL; anddetailRequestSignatureinDocumentViewer.tsxomitted the bearer token its own comment claimed was present. Review caught both before merge and each site now readsheaders.authorization ?? headers.Authorization ?? ''.mainhas no other property reads of that object — every remaining caller passes it wholesale tofetch, where casing is irrelevant — so this is a note for the future, not an outstanding defect.authorizationIdentity(headers)helper so there is one definition, then consider a narrower type so.Authorizationstops type-checking at all.Branch restarted from
origin/main(e8adde1) rather than stacked on the merged #1741 history, per AGENTS.md's merged-PR rule. The old remote branch was deleted on merge.Verification
npm run verify:pr-localDocs-only, single append-only ledger row, so the applicable gates were run directly rather than through the aggregate:
npm run check:outstanding-issues— "Outstanding-issues guard passed: 283 rows (139 open, 144 archived), unique ids, next-id=286 above the highest, no merge driver, no ids deleted from base e8adde1."npx prettier --check docs/outstanding-issues.md— "All matched files use Prettier code style!"No source, test, config, dependency or schema file is touched, so lint, typecheck, unit tests, build and the browser gates have no changed failure path to cover.
npm run verify:ui— not applicable, no UI change.npm run verify:release— not run, provider-backed, not claimed.RAG impact: no retrieval behaviour change — documentation only, one row appended to the outstanding-work ledger. No file under
src/is modified.Risk and rollout
check:outstanding-issues.Notes
mainfrom feat(document-viewer): rework the viewer for phone and PWA reading #1741: the container Chromium that cannot raster pdf.js 6, the physical iPhone acceptance owed for the pinch gesture and canvas budget, the two competing clinical-summary surfaces on the phone document route, the pdf.js decoder-asset probe, the still-uncalled batch signed-URL route, and the root-containerpr-handoff-stoptest failure.🤖 Generated with Claude Code
https://claude.ai/code/session_01ER2xPFzPzoS8fAxkgHC8yo
Generated by Claude Code