summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-06-19 16:06:58 +0000
committerJunio C Hamano <gitster@pobox.com>2010-06-20 21:58:26 -0700
commit1f0eb51391d58958dd9f1e6cbcba622c309303b2 (patch)
treeac3813ab266e383c850f43c1c5dc83431c2b85bf /git-cvsserver.perl
parentfce338a5433d34f119457c0f6e6560799ba14022 (diff)
downloadgit-1f0eb51391d58958dd9f1e6cbcba622c309303b2.tar.gz
git-cvsserver: fix error for invalid password formats
Change the error message to report the erroneous password character. $1 was never set in the previos version, it was a leftover from older code that used a regex for the test. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 6de7921796..0f45c39509 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2658,7 +2658,10 @@ sub descramble
# This should never happen, the same password format (A) has been
# used by CVS since the beginning of time
- die "invalid password format $1" unless substr($str, 0, 1) eq 'A';
+ {
+ my $fmt = substr($str, 0, 1);
+ die "invalid password format `$fmt'" unless $fmt eq 'A';
+ }
my @str = unpack "C*", substr($str, 1);
my $ret = join '', map { chr $SHIFTS[$_] } @str;