Git development
 help / color / mirror / Atom feed
From: aminnimaj@gmail.com
To: git@vger.kernel.org
Cc: peff@peff.net, ryan.hendrickson@alum.mit.edu,
	Aliwoto <aminnimaj@gmail.com>
Subject: [PATCH 0/1] http: reject unsupported proxy URL schemes
Date: Fri,  1 May 2026 19:04:00 +0000	[thread overview]
Message-ID: <20260501190401.1580-1-aminnimaj@gmail.com> (raw)

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.

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

 http.c                | 79 +++++++++++++++++++++++++++++--------------
 t/t5564-http-proxy.sh |  5 +++
 2 files changed, 59 insertions(+), 25 deletions(-)


base-commit: 67ad42147a7acc2af6074753ebd03d904476118f
-- 
2.49.0.windows.1


             reply	other threads:[~2026-05-01 19:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 19:04 aminnimaj [this message]
2026-05-01 19:04 ` [PATCH 1/1] http: reject unsupported proxy URL schemes aminnimaj
2026-05-03 22:19   ` Junio C Hamano
2026-05-05  9:19 ` [PATCH v2 0/1] " aminnimaj
2026-05-05  9:19   ` [PATCH v2 1/1] " 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=20260501190401.1580-1-aminnimaj@gmail.com \
    --to=aminnimaj@gmail.com \
    --cc=git@vger.kernel.org \
    --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