Skip to content
Commit e6a202f7 authored by Mike Frysinger's avatar Mike Frysinger
Browse files

project: add basic path checks for <copyfile> & <linkfile>

Reject paths in <copyfile> & <linkfile> that try to use symlinks or
non-file or non-dirs.

We don't fully validate <linkfile> when src is a glob as it's a bit
complicated -- any component in the src could be the glob.  We make
sure the destination is a directory, and that any paths in that dir
are created as symlinks.  So while this can be used to read any path,
it can't be abused to write to any paths.

Bug: https://crbug.com/gerrit/11218
Change-Id: I68b6d789b5ca4e43f569e75e8b293b3e13d3224b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/233074


Tested-by: default avatarMike Frysinger <vapier@google.com>
Reviewed-by: default avatarMike Frysinger <vapier@google.com>
Reviewed-by: default avatarMichael Mortensen <mmortensen@google.com>
parent 04122b72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment