import: Avoid following symbolic links inside directories being imported
authorJoey Hess <joeyh@joeyh.name>
Fri, 19 Aug 2022 17:31:16 +0000 (13:31 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 19 Aug 2022 17:31:16 +0000 (13:31 -0400)
commited39979ac8ec6ff2a279939440574927d5cc894a
tree0de4c732ed0dbe475b8d87f524f936a11a4fc5ee
parent4ca8e95773d3ab3308a142d3e3be5e2e2a564358
import: Avoid following symbolic links inside directories being imported

Too big a footgun.

This does not prevent attackers who can write to the directory being
imported from racing the check. But they can cause anything to be imported
anyway, so would be limited to getting the legacy import to follow into a
directory they do not write to, and move files out of it into the annex.
(The directory special remote does not have that problem since it does not
move files.)

Sponsored-by: Jack Hill on Patreon
CHANGELOG
CmdLine/Seek.hs
Remote/Directory.hs
doc/bugs/git-annex-import_imports_outside_of_directory.mdwn
doc/git-annex-import.mdwn