author | Junio C Hamano <junkio@cox.net> | |
Tue, 25 Oct 2005 01:59:18 +0000 (18:59 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 26 Oct 2005 06:53:28 +0000 (23:53 -0700) | ||
commit | 565ebbf79f61873042c22a7126d002c104e056f4 | |
tree | 764f8a201d063a7b49b07daa3a6e48b0af267162 | tree | snapshot |
parent | 9e48b389990c0201487e58f3bac32734a59a7e89 | commit | diff |
upload-pack: tighten request validation.
This makes sure what the other end asks for are among what we
offered to give them. Otherwise we would end up running
git-rev-list with 20-byte nonsense, only to find it either die
(because the object was not found) or waste time (because we
ended up serving that phony 'client').
Also avoid wasting needs_sha1 pool to record duplicates, and
detect cloning requests better.
[this used to be on top of Johannes fetch-pack enhancements,
which we are rewinding it for further testing for now, so
the commit is rebased.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
This makes sure what the other end asks for are among what we
offered to give them. Otherwise we would end up running
git-rev-list with 20-byte nonsense, only to find it either die
(because the object was not found) or waste time (because we
ended up serving that phony 'client').
Also avoid wasting needs_sha1 pool to record duplicates, and
detect cloning requests better.
[this used to be on top of Johannes fetch-pack enhancements,
which we are rewinding it for further testing for now, so
the commit is rebased.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
upload-pack.c | diff | blob | history |