Skip to content

fix: ensure partially encoded path parameters are fully URL-encoded - #1762

Merged
popmonkey merged 1 commit into
mainfrom
dec_2_enc
Oct 16, 2026
Merged

popmonkey merged 1 commit into
mainfrom
dec_2_enc

Conversation

@popmonkey

Copy link
Copy Markdown
Contributor

Previously, encodeParam / encode_path_param checked whether decode(value) === value before URL-encoding. If a parameter value contained both already percent-encoded sequences (such as %20) and unencoded reserved characters (such as + or ?), the equality check evaluated to false and skipped encoding the remaining reserved characters.

This change normalizes the input by decoding first and always URL-encoding the decoded result.

Previously, `encodeParam` / `encode_path_param` checked whether
`decode(value) === value` before URL-encoding. If a parameter value
contained both already percent-encoded sequences (such as `%20`) and
unencoded reserved characters (such as `+` or `?`), the equality
check evaluated to `false` and skipped encoding the remaining
reserved characters.

This change normalizes the input by decoding first and always
URL-encoding the decoded result.
@popmonkey
popmonkey requested a review from a team as a code owner October 16, 2026 18:46
@github-actions

Copy link
Copy Markdown
Contributor

Python Tests

 10 files   10 suites   1m 1s ⏱️
146 tests 141 ✅  5 💤 0 ❌
826 runs  800 ✅ 26 💤 0 ❌

Results for commit e122331.

@github-actions

Copy link
Copy Markdown
Contributor

Typescript Tests

  2 files  ±0   58 suites  ±0   48s ⏱️ -11s
211 tests ±0  209 ✅ ±0  2 💤 ±0  0 ❌ ±0 
450 runs  ±0  446 ✅ ±0  4 💤 ±0  0 ❌ ±0 

Results for commit e122331. ± Comparison against base commit b5f4b3d.

@popmonkey
popmonkey merged commit c17e0cc into main Oct 16, 2026
38 checks passed
@popmonkey
popmonkey deleted the dec_2_enc branch October 16, 2026 19:03
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.

2 participants