From: aminnimaj@gmail.com
To: git@vger.kernel.org
Cc: gitster@pobox.com, peff@peff.net, ryan.hendrickson@alum.mit.edu,
Aliwoto <aminnimaj@gmail.com>
Subject: [PATCH v2 0/1] http: reject unsupported proxy URL schemes
Date: Tue, 5 May 2026 09:19:39 +0000 [thread overview]
Message-ID: <20260505091941.1825-1-aminnimaj@gmail.com> (raw)
In-Reply-To: <20260501190401.1580-1-aminnimaj@gmail.com>
From: Aliwoto <aminnimaj@gmail.com>
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
--
2.49.0.windows.1
next prev parent reply other threads:[~2026-05-05 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 19:04 [PATCH 0/1] http: reject unsupported proxy URL schemes aminnimaj
2026-05-01 19:04 ` [PATCH 1/1] " aminnimaj
2026-05-03 22:19 ` Junio C Hamano
2026-05-05 9:19 ` aminnimaj [this message]
2026-05-05 9:19 ` [PATCH v2 " aminnimaj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260505091941.1825-1-aminnimaj@gmail.com \
--to=aminnimaj@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=ryan.hendrickson@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox