git-annex/Remote/Helper
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
..
Chunked filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
AWS.hs correct obsolete comment 2023-01-31 14:42:26 -04:00
Chunked.hs git-remote-annex: Display full url when using remote with the shorthand url 2024-05-24 17:15:31 -04:00
Encryptable.hs prevent using git-remote-annex with unsuitable special remote configs 2024-05-14 13:52:20 -04:00
ExportImport.hs export tree: avoid confusing output about renaming files 2024-03-09 13:50:26 -04:00
Git.hs implement Unavilable for gcrypt 2023-08-16 15:54:54 -04:00
Hooks.hs avoid annexFileMode special case 2023-04-27 15:58:37 -04:00
Http.hs git-lfs gitlab interoperability fix 2021-11-10 13:51:11 -04:00
Messages.hs filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
P2P.hs add directional stalldetection and bwlimit configs 2024-01-19 15:27:53 -04:00
Path.hs implement Unavilable for borg bup ddar directory rsync 2023-08-16 15:48:09 -04:00
ReadOnly.hs export tree: avoid confusing output about renaming files 2024-03-09 13:50:26 -04:00
Special.hs add directional stalldetection and bwlimit configs 2024-01-19 15:27:53 -04:00
Ssh.hs git-annex-shell: block relay requests 2024-06-10 14:16:27 -04:00
ThirdPartyPopulated.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00