6 ms·
Makes me wonder if I can make a crate called "../.." and have it overwrite some user files.
by hmottestad 9y ago
Makes me wonder if I can make a crate called "../.." and have it overwrite some user files.
- callumjones 9y agoIt looks like the files were managed by Git (see the output where the checkout errors out), so no that won't work.
- glandium 9y agoI thought git handled the windows special file names. Am I misremembering or is it a difference (and thus a bug) in libgit2? (used by cargo, afaik)
- kibwen 9y agoI believe that git chokes by default on special file names on Windows, but I think there's a config variable that you can set to fix it. I don't know if libgit2 differs here.
- steveklabnik 9y agoRegular old git will fail; I tried to check out MINIX's source code a month ago and the clone failed since a file was named COM.
- kibwen 9y agoCrate identifiers are required to be [a-zA-Z] for the first character and [a-zA-Z0-9_-] for the rest. So, no. :P
- aisofteng 9y agoMore succinctly: [A-z]+[A-z0-9_-]
- kibwen 9y agoIf you look closely at your comment, you'll realize the hilarious HN bug that prevents me from writing it as you suggest. :P
- majewsky 9y ago[a-zA-Z][a-zA-Z0-9_-]* FTFY
- deleted 9y ago[deleted]
- wruza 9y ago[\]^_` included, or is that a special case?
- jwilk 9y ago[A-z] is not the same as [A-Za-z] . The former includes a few punctuation characters that are between "Z" and "a".