Skip to content

fix(secrets): swap a match_body secret after another one misses - #281

Open
kvdb wants to merge 1 commit into
paradigmxyz:mainfrom
kvdb:fix/match-body-swap-after-miss
Open

kvdb wants to merge 1 commit into
paradigmxyz:mainfrom
kvdb:fix/match-body-swap-after-miss

Conversation

@kvdb

@kvdb kvdb commented Oct 13, 2026

Copy link
Copy Markdown

Fixes #280

On a miss, swapBody puts the bytes it read back as the body, as the hit path does, so a later match_body secret in the same transform still sees the body. Includes a regression test that fails without the fix.

swapBody reads the request body to EOF. On a miss it left the
BufferedBody at EOF, so every later match_body secret in the same
transform read an empty body and forwarded its placeholder unchanged.
Put the bytes back on a miss, as the hit path does.

Fixes paradigmxyz#280
BradleyGoulding added a commit to Cryptex-Data-Solutions/iron-proxy that referenced this pull request Oct 23, 2026
…body-after-miss

fix(secrets): swap a match_body secret after another one misses (upstream paradigmxyz#281, adapted)
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.

match_body: a secret after a body miss is never swapped

1 participant