@matheusbsbs / matheus-bagliano / commits / 460c6996e2
Fork 0

cvsserver: Don't send mixed messages to clients

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>

Frank Lichtenheld committed May 13, 2007 at 19:49 UTC 460c6996e27208898d3e24897e2ea35295c1cbf1
1 file changed +1
git-cvsserver.perl
+1
@@ -105,6 +105,7 @@ if (@ARGV && $ARGV[0] eq 'pserver') {
105 unless ($line eq 'anonymous') {
106 print "E Only anonymous user allowed via pserver\n";
107 print "I HATE YOU\n";
108 + exit;
109 }
110 $line = <STDIN>; chomp $line; # validate the password?
111 $line = <STDIN>; chomp $line;