All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Elliott Cable <me@ell.io>,
	Dennis Kaarsemaker <dennis.kaarsemaker@booking.com>,
	Git Mailing List <git@vger.kernel.org>,
	Brandon Williams <bmwill@google.com>
Subject: Re: persistent-https, url insteadof, and `git submodule`
Date: Wed, 31 May 2017 17:22:24 -0400	[thread overview]
Message-ID: <20170531212224.bhn36sa4g5ns54aj@sigill.intra.peff.net> (raw)
In-Reply-To: <CACBZZX6LQRW=78R-rkeUKmDCRUmN52SjkShSjDC5AgV5o7T6iQ@mail.gmail.com>

On Wed, May 31, 2017 at 04:23:49PM +0200, Ævar Arnfjörð Bjarmason wrote:

> > It really is an issue of the user knowing about the problem (and how to
> > solve it), and I don't think we can get around that securely. So better
> > documentation probably is the right solution.
> >
> > I'll see if I can cook something up.
> 
> I was going to say: A way to have our cake & eat it too here would be
> to just support *.insteadOfRegex, i.e.
> "url.persistent-https://.insteadOfRegex="^https://".
> 
> But in this case, even if we can just do un-anchored string
> replacement, isn't a way around this just to do
> "url.persistent-https://.insteadOf=https://" & untaint & document that
> you should do that?

I think we already do the second form, and that's what Elliott ran into.
The problem is that it is not clear if "persistent-https" is safe to use
for submodules. _We_ know that it is because we know what that remote
does, but Git doesn't know that. You would not necessarily want:

  [url "ext::ssh-wrapper "]
  insteadOf  = "ssh://"

to kick in for a submodule. That's a fairly insane thing to be doing,
but the point is that we don't know if the rewritten protocol is ready
to handle "tainted" URLs that come from an untrusted submodule file.

-Peff

  reply	other threads:[~2017-05-31 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19 19:57 persistent-https, url insteadof, and `git submodule` Elliott Cable
2017-05-19 21:43 ` Dennis Kaarsemaker
2017-05-19 21:55   ` Dennis Kaarsemaker
2017-05-20  7:07     ` Jeff King
2017-05-26 16:22       ` Elliott Cable
2017-05-31  4:50         ` Jeff King
2017-05-31 14:23           ` Ævar Arnfjörð Bjarmason
2017-05-31 21:22             ` Jeff King [this message]
2017-05-31  5:18         ` [PATCH] docs/config: mention protocol implications of url.insteadOf Jeff King
2017-06-01  0:15           ` Brandon Williams

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=20170531212224.bhn36sa4g5ns54aj@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=bmwill@google.com \
    --cc=dennis.kaarsemaker@booking.com \
    --cc=git@vger.kernel.org \
    --cc=me@ell.io \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.