]> git.ipfire.org Git - thirdparty/git.git/commit
bundle-uri: limit recursion depth for bundle lists
authorDerrick Stolee <derrickstolee@github.com>
Wed, 12 Oct 2022 12:52:34 +0000 (12:52 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Oct 2022 16:13:24 +0000 (09:13 -0700)
commit20c1e2a68bfcb85dd919c92a82c129cee215c23a
treea479e17003c043b6994cb134beda6f10786006f9
parent738e5245fa423fc43495e2e17e053365dc6b2fc0
bundle-uri: limit recursion depth for bundle lists

The next change will start allowing us to parse bundle lists that are
downloaded from a provided bundle URI. Those lists might point to other
lists, which could proceed to an arbitrary depth (and even create
cycles). Restructure fetch_bundle_uri() to have an internal version that
has a recursion depth. Compare that to a new max_bundle_uri_depth
constant that is twice as high as we expect this depth to be for any
legitimate use of bundle list linking.

We can consider making max_bundle_uri_depth a configurable value if
there is demonstrated value in the future.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle-uri.c