Subject: Re: Security problem

From: Junio C Hamano <[email-masked]>
Date: Thu, 15 Jun 2006 17:12:53 -0700

Alexander Litvinov <[email-masked]> 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.