Skip to content

fix(wasm): redact bearer tokens in debug output - #3142

Open
shuvroroy wants to merge 1 commit into
seanmonstar:masterfrom
shuvroroy:fix/wasm-bearer-redaction
Open

shuvroroy wants to merge 1 commit into
seanmonstar:masterfrom
shuvroroy:fix/wasm-bearer-redaction

Conversation

@shuvroroy

Copy link
Copy Markdown

On WASM, RequestBuilder::bearer_auth() leaves the Authorization header non-sensitive, exposing the token when a request or builder is formatted with Debug. Route bearer authentication through sensitive-header handling consistent with the native client.

Add browser tests covering redaction on requests, builders, and their clones, the exact authorization value, invalid-token errors, and sensitivity on explicitly supplied headers. The redaction regression fails before the fix and passes afterward in headless Firefox.

Validation:

  • Default features: 3 browser regression tests passed.
  • Default features disabled with json: 9 WASM unit tests and 5 browser integration tests passed.
  • cargo check --target wasm32-unknown-unknown, the same check with --features cookies, and cargo check --lib passed.
  • Formatting checks for the changed files and git diff --check passed.

The two network-dependent WASM smoke tests were excluded from the local browser runs.

Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Reqwest-PR: seanmonstar/reqwest#3142

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Reqwest-PR: seanmonstar/reqwest#3142

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Reqwest-PR: seanmonstar/reqwest#3142

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 16, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Reqwest-PR: seanmonstar/reqwest#3142

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 18, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Reqwest-PR: seanmonstar/reqwest#3142

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 20, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Reqwest-PR: seanmonstar/reqwest#3142

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output
Byron pushed a commit to GitoxideLabs/gitoxide that referenced this pull request Nov 24, 2026
Port the source worktree commit into `gix-reqwest`, retaining its author.
Retarget Rust crate paths and preserve upstream formatting.

Port validation: library, proxy, redirect, blocking, and client tests pass
with the stable optional features enabled; external TLS-info tests are
excluded.

Reqwest-Patch: d644894d6ebea3603ad472f0f04d853db6556c9a
Reqwest-PR: seanmonstar/reqwest#3142

Original source message:

fix(wasm): redact bearer tokens in debug output

<!-- agent -->
Transplanted from seanmonstar/reqwest#3142.
Original commit: 379176c6d4e90330c0ae8367c926a827e44b5f94.
Included in the reqwest patch stack for Gitoxide transport correctness, security, or transfer efficiency.
The source patch is preserved; local changes are kept in separate commits.

<!-- original message -->
fix(wasm): redact bearer tokens in debug output
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