git-daemon: timeout, eliminate double DWIM
authorH. Peter Anvin <hpa@zytor.com>
Wed, 19 Oct 2005 21:44:43 +0000 (14:44 -0700)
committerJunio C Hamano <junkio@cox.net>
Wed, 19 Oct 2005 21:44:43 +0000 (14:44 -0700)
It turns out that not only did git-daemon do DWIM, but git-upload-pack
does as well.  This is bad; security checks have to be performed *after*
canonicalization, not before.

Additionally, the current git-daemon can be trivially DoSed by spewing
SYNs at the target port.

This patch adds a --strict option to git-upload-pack to disable all
DWIM, a --timeout option to git-daemon and git-upload-pack, and an
--init-timeout option to git-daemon (which is typically set to a much
lower value, since the initial request should come immediately from the
client.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

No differences found