From: Junio C Hamano Date: Fri, 16 Jun 2006 00:12:53 GMT Subject: Re: Security problem Message-ID: <7vbqsuc60q.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <200606151709.22752.lan@academsoft.ru> Alexander Litvinov writes: > Why does not git-checkout check if file content match name of the object ? Good point. We could do a few things: - entry.c:write_entry() could validate after read_sha1_file(). - read_sha1_file() could do the checking; this has performance implications, though. Cloning over git aware protocols validate the objects coming over the wire, so it may make sense to cheat and do the former, so that we do not have to pay the validation cost every time we access any object.