]> git.ipfire.org Git - thirdparty/git.git/commit
serve: drop "keys" strvec
authorJeff King <peff@peff.net>
Wed, 15 Sep 2021 18:35:29 +0000 (14:35 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Sep 2021 19:25:19 +0000 (12:25 -0700)
commitf0a35c9ce52ade69311ab3b8cb111e145eb7b875
tree30cf2a411084e1d88d60d3aa9fcd55b10ae4b36b
parentab539c9094e3e3691f157830f74406042d55f774
serve: drop "keys" strvec

We collect the set of capabilities the client sends us in a strvec.
While this is usually small, there's no limit to the number of
capabilities the client can send us (e.g., they could just send us
"agent" pkt-lines over and over, and we'd keep adding them to the list).

Since all code has been converted away from using this list, let's get
rid of it. This avoids a potential attack where clients waste our
memory.

Note that we do have to replace it with a flag, because some of the
flush-packet logic checks whether we've seen any valid commands or keys.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
serve.c