0e7b2f2d18b607ac4dc2e8ba9f421f0a3b87fcb3
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 2"""
4  date="2020-05-08T18:19:20Z"
5  content="""
6 `git-annex import` does not do any sanitization, and that could be
7 considered inconsistent, particularly when importing from a remote like S3.
8
9 A difference with that is, it creates a remote tracking branch for the
10 imported files. (That happens to avoid "../" path traversal because git
11 generally avoids it.) Maybe the real difference is, import from a special
12 remote is completely analagous to fetching from a git remote. So it feels
13 different to me than adding an url does. 
14
15 If I sync with a S3 bucket and it turns out it imported a escape sequence
16 file, well I could have looked at the bucket first, or imported and
17 reviewed the branch before merging it. And if I was syncing with a git
18 remote the same thing could happen. So it feels like I should have no
19 expectation git-annex would protect me. Whereis, if I add an url and the
20 web server uses an obscure-ish http header to surprise me with a similar
21 malicious filename, I had no way before hand to know that would happen, and
22 so it does feel like git-annex should protect me.
23
24 (Although if git did prevent that, git-annex should too, and I'd be
25 fine with git preventing that.)
26 """]]