Mark more characters shell-safe.

I still worry about just quoting things when passing it off to "ssh" or
"sh -c", so I'm being anal.  But _, ^ and , are certainly ok and while
both ~ and @ can have speacial meaning to shell/ssh they are benign.
This commit is contained in:
Linus Torvalds 2005-07-07 17:59:23 -07:00
parent 659cacf5a9
commit 924e121954

View File

@ -57,7 +57,9 @@ static char *shell_safe(char *url)
['A'...'Z'] = 1,
['.'] = 1, ['/'] = 1,
['-'] = 1, ['+'] = 1,
[':'] = 1
[':'] = 1, ['_'] = 1,
['@'] = 1, [','] = 1,
['~'] = 1, ['^'] = 1,
};
while ((c = *n++) != 0) {