git-annex/P2P
Joey Hess 9a8391078a
git-annex-shell: block relay requests
connRepo is only used when relaying git upload-pack and receive-pack.
That's only supposed to be used when git-annex-remotedaemon is serving
git-remote-tor-annex connections over tor. But, it was always set, and
so could be used in other places possibly.

Fixed by making connRepo optional in the P2P protocol interface.

In Command.EnableTor, it's not needed, because it only speaks the
protocol in order to check that it's able to connect back to itself via
the hidden service. So changed that to pass Nothing rather than the git
repo.

In Remote.Helper.Ssh, it's connecting to git-annex-shell p2pstdio,
so is making the requests, so will never need connRepo.

In git-annex-shell p2pstdio, it was accepting git upload-pack and
receive-pack requests over the P2P protocol, even though nothing sent
them. This is arguably a security hole, particularly if the user has
set environment variables like GIT_ANNEX_SHELL_LIMITED to prevent
git push/pull via git-annex-shell.
2024-06-10 14:16:27 -04:00
..
Address.hs Windows: Support long filenames in more (possibly all) of the code 2023-03-01 15:55:58 -04:00
Annex.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
Auth.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
IO.hs git-annex-shell: block relay requests 2024-06-10 14:16:27 -04:00
Protocol.hs Apply codespell -w throughout 2023-03-17 15:14:58 -04:00