git-annex/RemoteDaemon/Transport
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
..
Ssh update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
GCrypt.hs start splitting out readonly values from AnnexState 2021-04-02 15:51:44 -04:00
Ssh.hs remove support code for ancient git-annex-shell version 2021-10-11 16:07:08 -04:00
Tor.hs git-annex-shell: block relay requests 2024-06-10 14:16:27 -04:00