Skip to content

Commit 1f0eb51

Browse files
avargitster
authored andcommitted
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>
1 parent fce338a commit 1f0eb51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-cvsserver.perl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,10 @@ sub descramble
26582658

26592659
# This should never happen, the same password format (A) has been
26602660
# used by CVS since the beginning of time
2661-
die "invalid password format $1" unless substr($str, 0, 1) eq 'A';
2661+
{
2662+
my $fmt = substr($str, 0, 1);
2663+
die "invalid password format `$fmt'" unless $fmt eq 'A';
2664+
}
26622665

26632666
my @str = unpack "C*", substr($str, 1);
26642667
my $ret = join '', map { chr $SHIFTS[$_] } @str;

0 commit comments

Comments
 (0)