Skip to content

fix(proxy): Harden URI parsing in port forwarding proxy#270

Merged
skazantsev merged 1 commit into
1.1from
fix/proxy-uri-parsing-1.1
Jul 8, 2026
Merged

fix(proxy): Harden URI parsing in port forwarding proxy#270
skazantsev merged 1 commit into
1.1from
fix/proxy-uri-parsing-1.1

Conversation

@skazantsev

@skazantsev skazantsev commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Harden createProxyRequest in the proxy server patch to use strict input
validation and the WHATWG URL constructor instead of the deprecated
url.resolve() API.

Changes:

  • Validate port is a well-formed positive integer (reject leading zeros)
  • Normalize leading slash/backslash sequences before constructing the target URL
  • Use new URL() with a base URL instead of url.resolve()
  • Verify the constructed URL's hostname and port match the intended target

Testing

  • Patch applies cleanly via prepare-src.sh
  • Manual verification on 1.2 build: legitimate proxied requests work, malformed inputs rejected

Additional Notes

Backport of #269 (1.2)


By submitting this pull request, I confirm that you can use, modify, copy,
and redistribute this contribution, under the terms of your choice.

@skazantsev skazantsev requested a review from a team as a code owner July 8, 2026 14:43
@skazantsev skazantsev added this pull request to the merge queue Jul 8, 2026
Merged via the queue into 1.1 with commit 644cb8f Jul 8, 2026
1 check passed
@skazantsev skazantsev deleted the fix/proxy-uri-parsing-1.1 branch July 8, 2026 15:18
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.

3 participants