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

Re: [PATCH v2 3/3] *: avoid "whitelist"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 15, 2022, 11:19 UTC
Message-ID
<220715.86k08ezkbl.gmgdl@evledraar.gmail.com>
In-Reply-To
<0d862cbbebe1a9f47f72255217faf734b1db4055.1657852722.git.gitgitgadget@gmail.com>
On Fri, Jul 15 2022, Derrick Stolee via GitGitGadget wrote:
Show 12 quoted lines
> From: Derrick Stolee <derrickstolee@github.com>
> [...]
> -	logerror("'%s': not in whitelist", path);
> +	logerror("'%s': not in directory list", path);
>  	return NULL;		/* Fallthrough. Deny by default */
>  }
>  	if (strict_paths && (!ok_paths || !*ok_paths))
> -		die("option --strict-paths requires a whitelist");
> +		die("option --strict-paths requires a directory list");
>  
>  	if (base_path && !is_directory(base_path))
>  		die("base-path '%s' does not exist or is not a directory",
The former here is worse than before, which relates to the latter.

Put yourself in the shoes of a user who gets this error message. You then do "man git-daemon", search for "whitelist", and the only thing you'll find are references to --strict-paths and --interpolated-path, which puts you on the right path.

IOW I don't care about the term "whitelist" here, I care that it it has (goes and counts...) 5 occurances in the manpage, directorty has 16.

And SYNOPSIS of "git-daemon" says "...[<directory...]", so that hypothehtical user is probably wondering e.g. if the directory they provided on argv is bad. It's not just 5 v.s. 16, it's that we've introduced jargon we only used for that feature, but now we use a vague general term.

So we need to tell the user *what directory*. That's obviously easy, we should refer back to the option that brought us here.

So per [1] I really welcome any improvements to the docs, but I was also expecting to find various issues related to the origin of this series blindly replacing things :( Please look a bit more at the bigger picture beyond the specific hunks being changed, I might have missed some similar issues on this read-through...

1. https://lore.kernel.org/git/220715.86sfn2zlkm.gmgdl@evledraar.gmail.com/
Previous: Derrick Stolee via GitGitGadgetNext: Junio C Hamano
Message 29 of 38 in “Use "allowlist" and "denylist" tree-wide”
  1. 0/3 Use "allowlist" and "denylist" tree-wideDerrick Stolee via GitGitGadget, Jul 13, 2022
  2. 1/3 Documentation: use allowlist and denylistDerrick Stolee via GitGitGadget, Jul 13, 2022
  3. Jeff KingJul 13, 2022
  4. Derrick StoleeJul 13, 2022
  5. Junio C HamanoJul 13, 2022
  6. 2/3 t/*: use allowlistDerrick Stolee via GitGitGadget, Jul 13, 2022
  7. 3/3 *: use allowlist and denylistDerrick Stolee via GitGitGadget, Jul 13, 2022
  8. Johannes SchindelinJul 13, 2022
  9. Jeff KingJul 13, 2022
  10. Johannes SchindelinJul 13, 2022
  11. Junio C HamanoJul 13, 2022
  12. Derrick StoleeJul 13, 2022
  13. Junio C HamanoJul 13, 2022
  14. Ævar Arnfjörð BjarmasonJul 13, 2022
  15. Junio C HamanoJul 13, 2022
  16. Derrick StoleeJul 15, 2022
  17. Ævar Arnfjörð BjarmasonJul 13, 2022
  18. 0/3 Remove use of "whitelist"Derrick Stolee via GitGitGadget, Jul 15, 2022
  19. 1/3 Documentation: remove use of whitelistDerrick Stolee via GitGitGadget, Jul 15, 2022
  20. Ævar Arnfjörð BjarmasonJul 15, 2022
  21. Derrick StoleeJul 19, 2022
  22. 2/3 t/*: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 15, 2022
  23. Ævar Arnfjörð BjarmasonJul 15, 2022
  24. Derrick StoleeJul 19, 2022
  25. Ævar Arnfjörð BjarmasonJul 19, 2022
  26. Derrick StoleeJul 19, 2022
  27. Junio C HamanoJul 19, 2022
  28. 3/3 *: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 15, 2022
  29. Ævar Arnfjörð BjarmasonJul 15, 2022
  30. Junio C HamanoJul 15, 2022
  31. Phillip WoodJul 15, 2022
  32. 0/5 Remove use of "whitelist"Derrick Stolee via GitGitGadget, Jul 19, 2022
  33. 1/5 daemon: clarify directory argumentsDerrick Stolee via GitGitGadget, Jul 19, 2022
  34. 2/5 git-cvsserver: clarify directory listDerrick Stolee via GitGitGadget, Jul 19, 2022
  35. 3/5 git.txt: remove redundant languageDerrick Stolee via GitGitGadget, Jul 19, 2022
  36. Jeff KingJul 31, 2022
  37. 4/5 t: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 19, 2022
  38. 5/5 transport.c: avoid "whitelist"Derrick Stolee via GitGitGadget, Jul 19, 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.