]> git.ipfire.org Git - thirdparty/git.git/commit - http.c
http: limit redirection depth
authorBlake Burkhart <bburky@bburky.com>
Tue, 22 Sep 2015 22:06:20 +0000 (18:06 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Sep 2015 22:32:28 +0000 (15:32 -0700)
commitb258116462399b318c86165c61a5c7123043cfd4
tree0fab49f2d65cee265a23f3b95e84c57a0e38430f
parentf4113cac0c88b4f36ee6f3abf3218034440a68e3
http: limit redirection depth

By default, libcurl will follow circular http redirects
forever. Let's put a cap on this so that somebody who can
trigger an automated fetch of an arbitrary repository (e.g.,
for CI) cannot convince git to loop infinitely.

The value chosen is 20, which is the same default that
Firefox uses.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c
t/lib-httpd/apache.conf
t/t5812-proto-disable-http.sh