git-annex/Command
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
..
Add.hs git-annex assist 2023-05-18 14:37:43 -04:00
AddUnused.hs addunused, dropunused: Support --json and --json-error-messages 2023-05-05 14:01:40 -04:00
AddUrl.hs support VURL backend 2024-02-29 13:48:51 -04:00
Adjust.hs rename to --unlock-present and better reverse adjusting 2020-11-13 14:56:43 -04:00
Assist.hs assist: With --jobs, parallelize transferring content to/from remotes 2023-07-05 12:47:30 -04:00
Assistant.hs git-annex assist 2023-05-18 14:37:43 -04:00
Benchmark.hs
CalcKey.hs safe output to terminal for calckey inprogress and lookupkey 2023-04-12 14:03:44 -04:00
CheckPresentKey.hs fix --from overriding annex-ignore 2023-11-30 15:12:07 -04:00
Config.hs config: Added the --show-origin and --for-file options 2023-06-12 16:24:31 -04:00
ConfigList.hs don't frontload reconcileStaged in git-annex init 2022-11-18 13:58:47 -04:00
ConfigRemote.hs configremote: Support --json and --json-error-messages 2023-05-10 14:21:42 -04:00
ContentLocation.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Copy.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Dead.hs expire, trust et al, dead, describe: Support --json and --json-error-messages 2023-05-05 15:33:30 -04:00
Describe.hs expire, trust et al, dead, describe: Support --json and --json-error-messages 2023-05-05 15:33:30 -04:00
DiffDriver.hs fix some build warnings from ghc 9.4.6 2023-09-21 13:38:36 -04:00
Direct.hs
Drop.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
DropKey.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
DropUnused.hs dropunused: Support --jobs 2023-07-21 14:03:34 -04:00
EnableRemote.hs initremote, enableremote: Added --with-url to enable using git-remote-annex 2024-05-24 14:29:36 -04:00
EnableTor.hs git-annex-shell: block relay requests 2024-06-10 14:16:27 -04:00
ExamineKey.hs implement URL to VURL migration 2024-03-01 16:42:02 -04:00
Expire.hs newtype MapLog 2023-11-13 14:37:22 -04:00
Export.hs fix reversion in unexport when unable to rename 2024-03-15 16:14:44 -04:00
FilterBranch.hs multiple -m second try 2024-04-09 12:56:47 -04:00
FilterProcess.hs smudge: Warn when encountering a pointer file that has other content appended to it 2022-02-23 15:17:08 -04:00
Find.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
FindKeys.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
FindRef.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Fix.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Forget.hs filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
FromKey.hs support VURL backend 2024-02-29 13:48:51 -04:00
Fsck.hs Merge branch 'master' into git-remote-annex 2024-05-15 17:49:12 -04:00
FuzzTest.hs eliminate showStart showStartOther 2023-04-10 16:28:58 -04:00
GCryptSetup.hs eliminate s2w8 and w82s 2023-10-26 13:12:57 -04:00
Get.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Group.hs group: Added --list option 2024-05-29 13:37:35 -04:00
GroupWanted.hs git style quoting for ActionItemOther 2023-04-08 16:30:01 -04:00
Help.hs
Import.hs multiple -m second try 2024-04-09 12:56:47 -04:00
ImportFeed.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
InAnnex.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Indirect.hs
Info.hs remove slightly incorrect comments 2023-12-29 13:23:27 -04:00
Init.hs init: Support --json and --json-error-messages 2023-05-08 14:58:08 -04:00
InitRemote.hs git-remote-annex: Display full url when using remote with the shorthand url 2024-05-24 17:15:31 -04:00
Inprogress.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
List.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Lock.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Log.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
LookupKey.hs lookupkey: Sped up --batch 2023-10-30 14:59:09 -04:00
Map.hs filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
MatchExpression.hs --explain for preferred/required content matching 2023-07-26 14:50:04 -04:00
Merge.hs sync: When in an adjusted branch, merge changes from the original branch 2023-07-06 12:42:24 -04:00
MetaData.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Migrate.hs Fix one ambigous typo 2024-05-01 15:46:15 -04:00
MinCopies.hs git style quoting for ActionItemOther 2023-04-08 16:30:01 -04:00
Mirror.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Move.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Multicast.hs json object for FileNotFound 2023-04-25 19:26:20 -04:00
NotifyChanges.hs
NumCopies.hs git style quoting for ActionItemOther 2023-04-08 16:30:01 -04:00
OldKeys.hs oldkeys: check associated files by default and add --unchecked 2023-08-23 13:46:41 -04:00
P2P.hs git-annex-shell: block relay requests 2024-06-10 14:16:27 -04:00
P2PStdIO.hs git-annex-shell: block relay requests 2024-06-10 14:16:27 -04:00
PostReceive.hs fix some build warnings from ghc 9.4.6 2023-09-21 13:40:22 -04:00
PreCommit.hs pre-commit: Avoid committing the git-annex branch 2024-02-12 14:42:11 -04:00
Proxy.hs
Pull.hs git-annex pull and push 2023-05-16 16:51:07 -04:00
Push.hs git-annex pull and push 2023-05-16 16:51:07 -04:00
ReadPresentKey.hs
RecvKey.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
RegisterUrl.hs filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
Reinit.hs reinit: Support --json and --json-error-messages 2023-05-08 15:07:40 -04:00
Reinject.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
ReKey.hs always verify content in distributed migration 2023-12-07 20:05:42 -04:00
RemoteDaemon.hs fix build with unix-2.8.0 2023-08-01 18:41:27 -04:00
RenameRemote.hs renameremote: Support --json and --json-error-messages 2023-05-08 16:25:40 -04:00
Repair.hs move several readonly values to AnnexRead 2022-06-28 15:40:19 -04:00
Required.hs
ReregisterUrl.hs add reregisterurl command 2024-03-05 15:06:14 -04:00
ResolveMerge.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Restage.hs restage: New git-annex command, handles restaging unlocked files 2022-09-23 16:29:59 -04:00
RmUrl.hs rmurl: Support --json and --json-error-messages 2023-05-04 11:28:27 -04:00
Satisfy.hs added git-annex satisfy 2023-06-29 15:34:53 -04:00
Schedule.hs filter out control characters and quote filenames 2023-04-11 14:27:22 -04:00
Semitrust.hs expire, trust et al, dead, describe: Support --json and --json-error-messages 2023-05-05 15:33:30 -04:00
SendKey.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
SetKey.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
SetPresentKey.hs rekey, setpresentkey: Support --json and --json-error-messages 2023-05-04 16:03:54 -04:00
Smudge.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
Status.hs filter out control characters and quote filenames 2023-04-11 14:27:22 -04:00
Sync.hs sync with special remotes with an annex:: url 2024-05-24 14:57:29 -04:00
Test.hs
TestRemote.hs testremote: Really fsck downloaded objects 2024-05-15 17:57:27 -04:00
TransferKey.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
TransferKeys.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
Transferrer.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
Trust.hs expire, trust et al, dead, describe: Support --json and --json-error-messages 2023-05-05 15:33:30 -04:00
Unannex.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
Undo.hs move commitStaged out of Command.Sync which no longer uses it 2024-02-07 16:19:28 -04:00
Ungroup.hs git style quoting for ActionItemOther 2023-04-08 16:30:01 -04:00
Uninit.hs fix empty tree import when directory does not exist 2023-08-15 12:57:41 -04:00
Unlock.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
UnregisterUrl.hs restore old registerurl location tracking behavior 2023-04-05 17:06:44 -04:00
Untrust.hs expire, trust et al, dead, describe: Support --json and --json-error-messages 2023-05-05 15:33:30 -04:00
Unused.hs git-annex unused --from remote skips its git-remote-annex keys 2024-05-14 15:17:40 -04:00
Upgrade.hs upgrade: Support --json and --json-error-messages and --json-progress 2023-05-10 12:54:48 -04:00
VAdd.hs filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
VCycle.hs filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
Version.hs version: Avoid error message when entire output is not read 2023-05-19 15:00:57 -04:00
VFilter.hs understand adjusted view branch names 2023-02-27 14:57:58 -04:00
Vicfg.hs vicfg: Include mincopies configuration 2022-09-15 15:11:59 -04:00
View.hs filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
VPop.hs git style quoting for ActionItemOther 2023-04-08 16:30:01 -04:00
Wanted.hs filter out control characters and quote filenames 2023-04-11 14:27:22 -04:00
Watch.hs webapp: Added --port option, and annex.port config 2024-01-25 14:08:36 -04:00
WebApp.hs webapp: Added --port option, and annex.port config 2024-01-25 14:08:36 -04:00
Whereis.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00
WhereUsed.hs add startAction parameter for KeySha 2023-12-06 13:28:02 -04:00