From: Linus Torvalds Date: Fri, 8 Jul 2005 00:59:23 +0000 (-0700) Subject: Mark more characters shell-safe. X-Git-Tag: v0.99~29 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=924e1219548253a1eaf744c1ea61a8466ec98d63;p=git.git 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. --- diff --git a/connect.c b/connect.c index 075683e8..3d4b31d3 100644 --- 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) {