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
This commit is contained in:
parent
4ca8e95773
commit
ed39979ac8
5 changed files with 13 additions and 3 deletions
|
@ -113,7 +113,7 @@ withPathContents a params = do
|
|||
( map (\f ->
|
||||
let f' = toRawFilePath f
|
||||
in (f', P.makeRelative (P.takeDirectory (P.dropTrailingPathSeparator p')) f'))
|
||||
<$> dirContentsRecursiveSkipping (".git" `isSuffixOf`) True p
|
||||
<$> dirContentsRecursiveSkipping (".git" `isSuffixOf`) False p
|
||||
, return [(p', P.takeFileName p')]
|
||||
)
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue