Merge branch 'v2.53.0.windows.3'

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2026-04-14 19:32:39 +02:00
2 changed files with 26 additions and 1 deletions

View File

@@ -420,7 +420,9 @@ jobs:
CI_JOB_IMAGE: ${{matrix.vector.image}}
CUSTOM_PATH: /custom
runs-on: ubuntu-latest
container: ${{matrix.vector.image}}
container:
image: ${{ matrix.vector.image }}
options: ${{ github.repository_visibility == 'private' && '--pids-limit 16384 --ulimit nproc=16384:16384 --ulimit nofile=32768:32768' || '' }}
steps:
- name: prepare libc6 for actions
if: matrix.vector.jobname == 'linux32'

View File

@@ -351,6 +351,29 @@ process_phantom_symlink(const wchar_t *wtarget, const wchar_t *wlink)
wchar_t relative[MAX_PATH];
const wchar_t *rel;
/*
* Do not follow symlinks to network shares, to avoid NTLM credential
* leak from crafted repositories (e.g. \\attacker-server\share).
* Since paths come in all kind of enterprising shapes and forms (in
* addition to the canonical `\\host\share` form, there's also
* `\??\UNC\host\share`, `\GLOBAL??\UNC\host\share` and also
* `\Device\Mup\host\share`, just to name a few), we simply avoid
* following every symlink target that starts with a slash.
*
* This also catches drive-less absolute paths, of course. These are
* uncommon in practice (and also fragile because they are relative to
* the current working directory's drive). The only "harm" this does
* is that it now requires users to specify via the Git attributes if
* they have such an uncommon symbolic link and need it to be a
* directory type link.
*/
if (is_wdir_sep(wtarget[0])) {
warning("created file symlink '%ls' pointing to '%ls';\n"
"set the `symlink` gitattribute to `dir` if a "
"directory symlink is required", wlink, wtarget);
return PHANTOM_SYMLINK_DONE;
}
/* check that wlink is still a file symlink */
if ((GetFileAttributesW(wlink)
& (FILE_ATTRIBUTE_REPARSE_POINT | FILE_ATTRIBUTE_DIRECTORY))