Skip to content

fix(request): strip credentials on cross-origin redirects - #92

Draft
miinimes1 wants to merge 1 commit into
tempoxyz:mainfrom
miinimes1:codex/strip-cross-origin-credentials
Draft

fix(request): strip credentials on cross-origin redirects#92
miinimes1 wants to merge 1 commit into
tempoxyz:mainfrom
miinimes1:codex/strip-cross-origin-credentials

Conversation

@miinimes1

Copy link
Copy Markdown

Motivation

tempo request -L manually follows redirects and copied request headers unchanged. A cross-origin redirect could therefore forward Authorization, Cookie, or Proxy-Authorization to the redirect target.

Summary

  • Strip credential-bearing headers when a redirect changes origin
  • Preserve credentials for same-origin redirects
  • Add regression coverage for both cases
  • Add a patch changelog entry

Validation

  • pnpm check:lint
  • pnpm check:types
  • pnpm test:types
  • pnpm changelog:validate
  • pnpm vitest run test/request.test.ts -t "(strips credentials|preserves credentials)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant