Skip to content

Commit

Permalink
cvsserver: Don't send mixed messages to clients
Browse files Browse the repository at this point in the history
After we send I HATE YOU we should probably exit and not happily
continue with I LOVE YOU and further communication.

Most clients will probably just exit and ignore everything we
send after the I HATE YOU and it is not a security problem
either because we don't really care about the user name anyway.

But it is still the right thing to do.

[jc: with a minor fixup to its exit code...]

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Acked-by: "Martin Langhoff" <martin.langhoff@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Frank Lichtenheld authored and Junio C Hamano committed May 14, 2007
1 parent dfaa61b commit 460c699
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
unless ($line eq 'anonymous') {
print "E Only anonymous user allowed via pserver\n";
print "I HATE YOU\n";
exit;
}
$line = <STDIN>; chomp $line; # validate the password?
$line = <STDIN>; chomp $line;
Expand Down

0 comments on commit 460c699

Please sign in to comment.