public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Danoloan <danolo@danoloan.es>
Cc: git@vger.kernel.org
Subject: Re: Git submodule recursive update not syncing submodule URLs makes the operation fail for commits updating the URLs
Date: Wed, 05 Jun 2024 10:32:58 -0700	[thread overview]
Message-ID: <xmqqtti7s3at.fsf@gitster.g> (raw)
In-Reply-To: <7869f213fe59fa80b9e8331dde89e795bd8cd5d4.camel@danoloan.es> (Danoloan's message of "Wed, 05 Jun 2024 16:02:10 +0200")

Danoloan <danolo@danoloan.es> writes:

> the old one. This is typical when the new URL may be a fork or a mirror
> in another server.

Isn't the flip side of the same coin that you can sneak in a change
to .gitmodules in the superproject ("hey I have this neat fork of
the superproject at this other URL, please pull from me"), so that
it points at a malicious URL?  If the end-user is not given a chance
to inspect where the URL moved to and agree (or disagree) to switch
to that other URL, your "recursive" update will end up fetching from
an unverified URL into the submodule without anybody watching, no?

So, I suspect that it is working as a security measure that it does
not blindly sync.

Yes "git clone --recursive" may be looser, but I would actually
consider use of "--recursive" there as a security lapse.

  reply	other threads:[~2024-06-05 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 14:02 Git submodule recursive update not syncing submodule URLs makes the operation fail for commits updating the URLs Danoloan
2024-06-05 17:32 ` Junio C Hamano [this message]
2024-06-05 21:03   ` Danoloan

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=xmqqtti7s3at.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=danolo@danoloan.es \
    --cc=git@vger.kernel.org \
    /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