From: Ævar Arnfjörð Bjarmason Date: Sat, 19 Jun 2010 16:06:58 +0000 (+0000) Subject: git-cvsserver: fix error for invalid password formats X-Git-Tag: v1.7.2-rc0~40 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1f0eb51391d58958dd9f1e6cbcba622c309303b2;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 6de792179..0f45c3950 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;