git-annex/Assistant/WebApp/Configurators
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
..
AWS.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
Delete.hs remove xmpp support 2016-11-14 14:53:08 -04:00
Edit.hs add annex-ignore-command and annex-sync-command configs 2017-08-17 13:54:14 -04:00
Fsck.hs import Data.Default in Common 2015-01-28 16:11:28 -04:00
IA.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
Local.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
Pairing.hs improve description of password prompting 2016-12-28 16:07:49 -04:00
Preferences.hs webapp: Fix bugs that could result in a relative path such as "." being written to ~/.config/git-annex/autostart 2015-12-02 15:57:30 -04:00
Ssh.hs avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Unused.hs import Data.Default in Common 2015-01-28 16:11:28 -04:00
Upgrade.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
WebDAV.hs add annex-ignore-command and annex-sync-command configs 2017-08-17 13:54:14 -04:00