addurl --preserve-filename: reject control characters
authorJoey Hess <joeyh@joeyh.name>
Mon, 10 Apr 2023 16:13:26 +0000 (12:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 10 Apr 2023 16:18:25 +0000 (12:18 -0400)
commitda83652c760abf66819603e99c0a94b857050c85
tree4334c5c88c107214b11f79a25a5666ee970bfe98
parent1c21ce17d44c7d9e5f827f1d02e37e9e51216f1d
addurl --preserve-filename: reject control characters

As well as escape sequences, control characters seem unlikely to be desired when
doing addurl, and likely to trip someone up. So disallow them as well.

I did consider going the other way and allowing filenames with control characters
and escape sequences, since git-annex is in the process of escaping display
of all filenames. Might still be a better idea?

Also display the illegal filename git quoted when it rejects it.

Sponsored-by: Nicholas Golder-Manning on Patreon
Annex/UntrustedFilePath.hs
CHANGELOG
Command/AddUrl.hs
doc/git-annex-addurl.mdwn