Skip to content

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

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

fix(proxy): Harden URI parsing in port forwarding proxy#272
skazantsev merged 1 commit into
mainfrom
fix/proxy-uri-parsing-main

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

Same fix applied to all active branches.


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:54
@skazantsev skazantsev added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit 995dac0 Jul 8, 2026
3 checks passed
@skazantsev skazantsev deleted the fix/proxy-uri-parsing-main branch July 8, 2026 15:19
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