git-annex/Assistant/WebApp
Joey Hess df11e54788
avoid the dashed ssh hostname class of security holes
Security fix: Disallow hostname starting with a dash, which would get
passed to ssh and be treated an option. This could be used by an attacker
who provides a crafted ssh url (for eg a git remote) to execute arbitrary
code via ssh -oProxyCommand.

No CVE has yet been assigned for this hole.
The same class of security hole recently affected git itself,
CVE-2017-1000117.

Method: Identified all places where ssh is run, by git grep '"ssh"'
Converted them all to use a SshHost, if they did not already, for
specifying the hostname.

SshHost was made a data type with a smart constructor, which rejects
hostnames starting with '-'.

Note that git-annex already contains extensive use of Utility.SafeCommand,
which fixes a similar class of problem where a filename starting with a
dash gets passed to a program which treats it as an option.

This commit was sponsored by Jochen Bartl on Patreon.
2017-08-17 22:11:31 -04:00
..
Configurators avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Common.hs generalize catchHardwareFault to catchIOErrorType 2015-12-06 16:26:38 -04:00
Configurators.hs webapp: full wormhole pairing UI (untested) 2016-12-27 16:41:35 -04:00
Control.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
DashBoard.hs AssociatedFile newtype 2017-03-10 13:35:31 -04:00
Documentation.hs version: Added "dependency versions" line. 2017-04-07 18:16:11 -04:00
Form.hs remove redundant constraint 2016-11-11 18:39:05 -04:00
Gpg.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00
MakeRemote.hs
Notifications.hs Merge branch 'master' into no-xmpp 2016-12-24 15:01:55 -04:00
OtherRepos.hs
Page.hs
Pairing.hs webapp: full wormhole pairing UI (untested) 2016-12-27 16:41:35 -04:00
Repair.hs
RepoId.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
RepoList.hs annex.autocommit can be configured via git-annex config 2017-02-03 13:58:53 -04:00
routes webapp: full wormhole pairing UI (untested) 2016-12-27 16:41:35 -04:00
SideBar.hs
Types.hs webapp: full wormhole pairing UI (untested) 2016-12-27 16:41:35 -04:00