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:
parent
659cacf5a9
commit
924e121954
@ -57,7 +57,9 @@ static char *shell_safe(char *url)
|
|||||||
['A'...'Z'] = 1,
|
['A'...'Z'] = 1,
|
||||||
['.'] = 1, ['/'] = 1,
|
['.'] = 1, ['/'] = 1,
|
||||||
['-'] = 1, ['+'] = 1,
|
['-'] = 1, ['+'] = 1,
|
||||||
[':'] = 1
|
[':'] = 1, ['_'] = 1,
|
||||||
|
['@'] = 1, [','] = 1,
|
||||||
|
['~'] = 1, ['^'] = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
while ((c = *n++) != 0) {
|
while ((c = *n++) != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user