Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Mark more characters shell-safe.
author
Linus Torvalds
<torvalds@g5.osdl.org>
Fri, 8 Jul 2005 00:59:23 +0000
(17:59 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Fri, 8 Jul 2005 00:59:23 +0000
(17:59 -0700)
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.
connect.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
659cacf
)
diff --git
a/connect.c
b/connect.c
index 075683e83c48282dfbd2626e89047af398cc7e4d..3d4b31d3405a4bb61f81a03fc1103ba2bea68411 100644
(file)
--- a/
connect.c
+++ b/
connect.c
@@
-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) {