Skip to content

http: reject unsupported proxy URL schemes

[email protected] git 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 0 repliesNew
  2. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

- make SOCKS proxy type handling table-driven
- use test_must_fail in the regression test
- use test_grep on the essential error text

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1http: reject unsupported proxy URL schemeshttp.c t/t5564-http-proxy.sh+74 -250 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/1] http: reject unsupported proxy URL schemes

From: Aliwoto <[email protected]>

An explicit proxy URL with an unsupported scheme such as htpp://127.0.0.1 is currently accepted and treated as an HTTP proxy.

This happens because Git parses the URL, extracts the host part, and passes only that host to libcurl without rejecting the unsupported scheme. As a result, the typo is silently accepted.

This patch rejects explicit unsupported proxy schemes while keeping the existing host:port-without-scheme behavior unchanged, and adds a regression test for the unsupported-scheme case.

---
Changes in v2:
- make SOCKS proxy type handling table-driven
- use test_must_fail in the regression test
- use test_grep on the essential error text

Aliwoto (1):
http: reject unsupported proxy URL schemes

 http.c                | 93 +++++++++++++++++++++++++++++++------------
 t/t5564-http-proxy.sh |  6 +++
 2 files changed, 74 insertions(+), 25 deletions(-)

base-commit: 67ad42147a7acc2af6074753ebd03d904476118f

Signature · 1 line
2.49.0.windows.1