]> git.ipfire.org Git - thirdparty/git.git/commit - fsck.c
fsck: check .gitmodules content
authorJeff King <peff@peff.net>
Wed, 2 May 2018 21:25:27 +0000 (17:25 -0400)
committerJeff King <peff@peff.net>
Tue, 22 May 2018 03:55:12 +0000 (23:55 -0400)
commited8b10f631c9a71df3351d46187bf7f3fa4f9b7e
tree9737045b5a965b0b741baaa1bf68bc254f0bbb97
parent2738744426c161a98c2ec494d41241a4c5eef9ef
fsck: check .gitmodules content

This patch detects and blocks submodule names which do not
match the policy set forth in submodule-config. These should
already be caught by the submodule code itself, but putting
the check here means that newer versions of Git can protect
older ones from malicious entries (e.g., a server with
receive.fsckObjects will block the objects, protecting
clients which fetch from it).

As a side effect, this means fsck will also complain about
.gitmodules files that cannot be parsed (or were larger than
core.bigFileThreshold).

Signed-off-by: Jeff King <peff@peff.net>
fsck.c