Re: Security problem
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 16, 2006, 00:12 UTC
- Message-ID
- <7vbqsuc60q.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200606151709.22752.lan@academsoft.ru>
Alexander Litvinov <lan@academsoft.ru> 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.