From: Christian Couder Date: Wed, 27 May 2026 15:37:24 GMT Subject: Re: [PATCH v3 6/8] promisor-remote: trust known remotes matching acceptFromServerUrl Message-ID: In-Reply-To: <97b9f2cd-7c82-4d4c-b574-31176074e566@app.fastmail.com> On Sat, May 23, 2026 at 5:17 PM Kristoffer Haugsbakk wrote: > > On Tue, May 19, 2026, at 17:38, Christian Couder wrote: > >[snip] > > > > Let's then use this helper in should_accept_remote() so that, a known > > remote whose URL matches the allowlist is accepted. > > I don’t understand this comma break? I have removed it in the v4 I just sent. Sorry for the confusion. > > ++ > > +Before matching, both the advertised URL and the pattern are > > +normalized: the scheme and host are lowercased, percent-encoded > > This next paragraph seems to go back to describing how things work. But > this paragraph as well as all of the following ones belong to this list > item: > > 4. Be careful using globs [...] > > Before matching, [...] > > The glob pattern can [...] > > If a remote with the [...] > > For the security implications [...] > > promisor.checkFields > [...] > > I don’t know what the intent is. But using an open block will delimit > the ordered list. > > diff --git Documentation/config/promisor.adoc Documentation/config/promisor.adoc > index cc728bb0b5e..f07a2e883bd 100644 > --- Documentation/config/promisor.adoc > +++ Documentation/config/promisor.adoc > @@ -109,6 +109,7 @@ and to update fields (such as authentication tokens) on known remotes > without further confirmation. To minimize security risks, follow these > guidelines: > + > +-- > 1. Start with a secure protocol scheme, like `https://` or `ssh://`. > + > 2. Only allow domain names or paths where you control and trust _ALL_ > @@ -130,6 +131,7 @@ guidelines: > subdomain. This is extremely dangerous on shared hosting platforms > (e.g., `https://*.github.io/*` trusts every user's site on the > entire platform). > +-- > + > Before matching, both the advertised URL and the pattern are > normalized: the scheme and host are lowercased, percent-encoded Thanks for the suggestion, it is indeed much better this way, and this is what is used in v4.