diff options
author | Thomas Wolf <twolf@apache.org> | 2023-08-11 21:40:13 +0200 |
---|---|---|
committer | Chao Wang <soul2zimate@gmail.com> | 2023-10-22 19:58:31 +0800 |
commit | 170244d05977491271a1cc234583d2e5ba75145d (patch) | |
tree | e420e5141114ea2baedbbebf48d6676b5d71737b /org.eclipse.jgit.lfs.server.test/pom.xml | |
parent | 4d6671b4cec3b3822c75089f3a8aa16c39d49307 (diff) | |
download | jgit-170244d05977491271a1cc234583d2e5ba75145d.tar.gz jgit-170244d05977491271a1cc234583d2e5ba75145d.zip |
Checkout: better directory handling
This backports the upstream security fix to downstream stable-5.13 branch.
(cherry picked from commit 9072103f3b3cf64dd12ad2949836ab98f62dabf1)
When checking out a file into the working tree ensure that all parent
directories of the file below the working tree root are actually
directories and do exist before we try to create the file.
When multiple files are to be checked out (or even a whole tree), this
may check the same directories over and over again. Asking the file
system every time for file attributes is a potentially expensive
operation. As a remedy, introduce an in-memory cache of directory
states for a particular check-out operation.
Apply the same fix also in the ResolveMerger, which may also check out
files, and also in the PatchApplier. In PatchApplier, also validate
paths.
Change-Id: Ie12864c54c9f901a2ccee7caddec73027f353111
Signed-off-by: Thomas Wolf <twolf@apache.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server.test/pom.xml')
0 files changed, 0 insertions, 0 deletions