1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-28 08:05:04 +02:00

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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2010-06-19 16:06:58 +00:00 committed by Junio C Hamano
parent fce338a543
commit 1f0eb51391

View File

@ -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;