projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
659cacf
)
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
diff --git
a/connect.c
b/connect.c
index
075683e
..
3d4b31d
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) {