git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] config: respect includes in protected config

From
Jeff King <peff@peff.net>
Date
Oct 14, 2022, 20:14 UTC
Message-ID
<Y0nDGFVxC4ImbLFQ@coredump.intra.peff.net>
In-Reply-To
<pull.1360.v2.git.git.1665683027912.gitgitgadget@gmail.com>
On Thu, Oct 13, 2022 at 05:43:47PM +0000, Glen Choo via GitGitGadget wrote:
Show 7 quoted lines
> From: Glen Choo <chooglen@google.com>
> 
> Protected config is implemented by reading a fixed set of paths,
> which ignores config [include]-s. Replace this implementation with a
> call to config_with_options(), which handles [include]-s and saves us
> from duplicating the logic of 1) identifying which paths to read and 2)
> reading command line config.

FWIW, this left me scratching my head for a moment, as I thought it was advocating reading includes from unsafe sources (which, since they can specify arbitrary paths, can cause various bits of mischief).

But looking at the patch, you mean that when reading potentially-unsafe sources, we'll skip the unsafe ones (like .git/config) entirely, but we fail to respect includes in the safe ones (like ~/.gitconfig)? That makes sense.

-Peff
Previous: Glen ChooNext: Johannes Schindelin
Message 12 of 13 in “[2.38 regression] config: respect includes in protected config”
  1. 0/2 [2.38 regression] config: respect includes in protected configGlen Choo via GitGitGadget, Oct 12, 2022
  2. 1/2 t0033, t0035: test for included configGlen Choo via GitGitGadget, Oct 12, 2022
  3. Ævar Arnfjörð BjarmasonOct 12, 2022
  4. 2/2 config: respect includes in protected configGlen Choo via GitGitGadget, Oct 12, 2022
  5. Junio C HamanoOct 12, 2022
  6. Glen ChooOct 12, 2022
  7. Junio C HamanoOct 12, 2022
  8. Glen ChooOct 12, 2022
  9. Junio C HamanoOct 12, 2022
  10. config: respect includes in protected configGlen Choo via GitGitGadget, Oct 13, 2022
  11. Glen ChooOct 13, 2022
  12. Jeff KingOct 14, 2022
  13. Johannes SchindelinOct 18, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.