From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, blees@dcon.de,
Junio C Hamano <gitster@pobox.com>,
kyle@kyleam.com, sxlijin@gmail.com,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v3 0/3] Directory traversal bugs
Date: Tue, 17 Dec 2019 12:18:12 +0100 (CET) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1912171217000.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <pull.676.v3.git.git.1576571586.gitgitgadget@gmail.com>
Hi Elijah,
On Tue, 17 Dec 2019, Elijah Newren via GitGitGadget wrote:
> This series documents multiple fill_directory() bugs, and fixes the one that
> is new to 2.24.0 coming from en/clean-nested-with-ignored-topic, the rest
> having been around in versions of git going back up to a decade.
>
> Changes since v2:
>
> * gutted the series of most the fixes, dropping the patch count from 8 to
> 3, due to incompatibility with git-for-windows (which interestingly has a
> different compat/win32/dirent.h than git.git does). The only bugs
> reported by a user are fixed by patch 3, and fixing the remaining bugs
> (which I found while investigating the one fixed bug) would require a
> major refactor that I don't have the time for currently.
I am really sorry that I caused you so much work.
As I said elsewhere, if Git for Windows' FSCache hack is the only thing
that is broken by this patch series, in light of the bugs that it _does_
fix I would rather adjust the FSCache patches to accommodate v2.
What do you think?
Ciao,
Dscho
> Elijah Newren (3):
> t3011: demonstrate directory traversal failures
> dir: remove stray quote character in comment
> dir: exit before wildcard fall-through if there is no wildcard
>
> dir.c | 9 +-
> ...common-prefixes-and-directory-traversal.sh | 209 ++++++++++++++++++
> 2 files changed, 217 insertions(+), 1 deletion(-)
> create mode 100755 t/t3011-common-prefixes-and-directory-traversal.sh
>
>
> base-commit: da72936f544fec5a335e66432610e4cef4430991
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-676%2Fnewren%2Fls-files-bug-v3
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-676/newren/ls-files-bug-v3
> Pull-Request: https://github.com/git/git/pull/676
>
> Range-diff vs v2:
>
> 1: 6d659b2302 ! 1: 61d303d8bd t3011: demonstrate directory traversal failures
> @@ -14,6 +14,18 @@
> of the en/clean-nested-with-ignored-topic); the other 5 also failed
> under git-2.23.0 and earlier.
>
> + The old failing tests can be traced down to the common prefix
> + optimization in dir.c handling paths differently than
> + read_directory_recursive() and treat_path() would, due to incomplete
> + duplication of logic into treat_leading_path() and having that
> + function call treat_one_path() rather than treat_path(). Fixing
> + that problem would require restructuring treat_path() and its full
> + call hierarchy to stop taking a dirent; see
> + https://lore.kernel.org/git/xmqqzhfshsk2.fsf@gitster-ct.c.googlers.com/
> + and the thread surrounding it for details.
> +
> + For now, simply document the breakages.
> +
> Signed-off-by: Elijah Newren <newren@gmail.com>
>
> diff --git a/t/t3011-common-prefixes-and-directory-traversal.sh b/t/t3011-common-prefixes-and-directory-traversal.sh
> 2: 79f2b56174 < -: ---------- Revert "dir.c: make 'git-status --ignored' work within leading directories"
> 3: d6f858cab1 = 2: 49b0b628db dir: remove stray quote character in comment
> 4: 8d2d98eec3 = 3: 47814640e4 dir: exit before wildcard fall-through if there is no wildcard
> 5: d2f5623bd7 < -: ---------- dir: break part of read_directory_recursive() out for reuse
> 6: 9839aca00a < -: ---------- dir: fix checks on common prefix directory
> 7: df7f08886a < -: ---------- dir: synchronize treat_leading_path() and read_directory_recursive()
> 8: 77b57e44fd < -: ---------- dir: consolidate similar code in treat_directory()
>
> --
> gitgitgadget
>
next prev parent reply other threads:[~2019-12-17 11:18 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 20:47 [PATCH 0/8] Directory traversal bugs Elijah Newren via GitGitGadget
2019-12-09 20:47 ` [PATCH 1/8] t3011: demonstrate directory traversal failures Elijah Newren via GitGitGadget
2019-12-09 21:06 ` Denton Liu
2019-12-09 20:47 ` [PATCH 2/8] Revert "dir.c: make 'git-status --ignored' work within leading directories" Elijah Newren via GitGitGadget
2019-12-09 21:32 ` Denton Liu
2019-12-09 21:51 ` Elijah Newren
2019-12-09 22:09 ` Eric Sunshine
2019-12-09 20:47 ` [PATCH 3/8] dir: remove stray quote character in comment Elijah Newren via GitGitGadget
2019-12-09 20:47 ` [PATCH 4/8] dir: exit before wildcard fall-through if there is no wildcard Elijah Newren via GitGitGadget
2019-12-09 20:47 ` [PATCH 5/8] dir: break part of read_directory_recursive() out for reuse Elijah Newren via GitGitGadget
2019-12-09 20:47 ` [PATCH 6/8] dir: fix checks on common prefix directory Elijah Newren via GitGitGadget
2019-12-09 20:47 ` [PATCH 7/8] dir: synchronize treat_leading_path() and read_directory_recursive() Elijah Newren via GitGitGadget
2019-12-09 20:47 ` [PATCH 8/8] dir: consolidate similar code in treat_directory() Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 0/8] Directory traversal bugs Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 1/8] t3011: demonstrate directory traversal failures Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 2/8] Revert "dir.c: make 'git-status --ignored' work within leading directories" Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 3/8] dir: remove stray quote character in comment Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 4/8] dir: exit before wildcard fall-through if there is no wildcard Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 5/8] dir: break part of read_directory_recursive() out for reuse Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 6/8] dir: fix checks on common prefix directory Elijah Newren via GitGitGadget
2019-12-15 10:29 ` Johannes Schindelin
2019-12-16 13:51 ` Elijah Newren
2019-12-16 16:00 ` Elijah Newren
2019-12-16 18:13 ` Junio C Hamano
2019-12-16 21:08 ` Elijah Newren
2019-12-16 21:25 ` Junio C Hamano
2019-12-16 22:39 ` Elijah Newren
2019-12-17 0:04 ` Johannes Schindelin
2019-12-17 0:14 ` Junio C Hamano
2019-12-17 11:08 ` Johannes Schindelin
2019-12-17 17:33 ` Junio C Hamano
2019-12-17 19:32 ` Johannes Schindelin
2019-12-17 5:26 ` Elijah Newren
2019-12-17 11:15 ` Johannes Schindelin
2019-12-17 16:58 ` Elijah Newren
2019-12-10 20:00 ` [PATCH v2 7/8] dir: synchronize treat_leading_path() and read_directory_recursive() Elijah Newren via GitGitGadget
2019-12-10 20:00 ` [PATCH v2 8/8] dir: consolidate similar code in treat_directory() Elijah Newren via GitGitGadget
2019-12-17 8:33 ` [PATCH v3 0/3] Directory traversal bugs Elijah Newren via GitGitGadget
2019-12-17 8:33 ` [PATCH v3 1/3] t3011: demonstrate directory traversal failures Elijah Newren via GitGitGadget
2019-12-17 8:33 ` [PATCH v3 2/3] dir: remove stray quote character in comment Elijah Newren via GitGitGadget
2019-12-17 8:33 ` [PATCH v3 3/3] dir: exit before wildcard fall-through if there is no wildcard Elijah Newren via GitGitGadget
2019-12-17 11:18 ` Johannes Schindelin [this message]
2019-12-17 18:24 ` [PATCH v3 0/3] Directory traversal bugs Junio C Hamano
2019-12-21 22:05 ` Johannes Schindelin
2019-12-18 19:29 ` [PATCH v4 0/8] " Elijah Newren via GitGitGadget
2019-12-18 19:29 ` [PATCH v4 1/8] t3011: demonstrate directory traversal failures Elijah Newren via GitGitGadget
2019-12-18 19:29 ` [PATCH v4 2/8] Revert "dir.c: make 'git-status --ignored' work within leading directories" Elijah Newren via GitGitGadget
2019-12-18 19:29 ` [PATCH v4 3/8] dir: remove stray quote character in comment Elijah Newren via GitGitGadget
2019-12-18 19:29 ` [PATCH v4 4/8] dir: exit before wildcard fall-through if there is no wildcard Elijah Newren via GitGitGadget
2019-12-18 19:29 ` [PATCH v4 5/8] dir: break part of read_directory_recursive() out for reuse Elijah Newren via GitGitGadget
2019-12-18 19:29 ` [PATCH v4 6/8] dir: fix checks on common prefix directory Elijah Newren via GitGitGadget
2019-12-18 21:29 ` Junio C Hamano
2019-12-19 20:23 ` Elijah Newren
2019-12-19 22:24 ` Jeff King
2019-12-20 17:00 ` Elijah Newren
2019-12-20 21:14 ` Jeff King
2019-12-20 18:01 ` Junio C Hamano
2019-12-20 21:15 ` Jeff King
2019-12-18 19:29 ` [PATCH v4 7/8] dir: synchronize treat_leading_path() and read_directory_recursive() Elijah Newren via GitGitGadget
2019-12-18 19:29 ` [PATCH v4 8/8] dir: consolidate similar code in treat_directory() Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 0/8] Directory traversal bugs Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 1/8] t3011: demonstrate directory traversal failures Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 2/8] Revert "dir.c: make 'git-status --ignored' work within leading directories" Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 3/8] dir: remove stray quote character in comment Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 4/8] dir: exit before wildcard fall-through if there is no wildcard Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 5/8] dir: break part of read_directory_recursive() out for reuse Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 6/8] dir: fix checks on common prefix directory Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 7/8] dir: synchronize treat_leading_path() and read_directory_recursive() Elijah Newren via GitGitGadget
2019-12-19 21:28 ` [PATCH v5 8/8] dir: consolidate similar code in treat_directory() Elijah Newren via GitGitGadget
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=nycvar.QRO.7.76.6.1912171217000.46@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=blees@dcon.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=kyle@kyleam.com \
--cc=sxlijin@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).