Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lodato <lodatom@gmail.com>2009-09-13 04:33:23 +0400
committerJunio C Hamano <gitster@pobox.com>2009-09-13 12:28:07 +0400
commitd3d7d47e6e0c3077fa39ffcca2b7f5f48ea97812 (patch)
tree27f36a974a6947004d64ec131e721d968e0757ea /git-svn.perl
parent45c58ba00a9c4e31e94997b59fd8112f962fa222 (diff)
svn: properly escape arguments for authors-prog
Previously, the call to authors-prog was not properly escaped, so any special characters in the Subversion username, such as spaces and semi-colons, would be interpreted by the shell rather than being passed in as the first argument. Now all unsafe characters are escaped using "git rev-parse --sq-quote" [ew: switched from "\Q..\E" to "rev-parse --sq-quote"] Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index d075810724..24bdbf5b81 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2810,6 +2810,7 @@ sub other_gs {
sub call_authors_prog {
my ($orig_author) = @_;
+ $orig_author = command_oneline('rev-parse', '--sq-quote', $orig_author);
my $author = `$::_authors_prog $orig_author`;
if ($? != 0) {
die "$::_authors_prog failed with exit code $?\n"