Brandon Williams
f1762d772e
transport: add protocol policy config option
...
Previously the `GIT_ALLOW_PROTOCOL` environment variable was used to
specify a whitelist of protocols to be used in clone/fetch/push
commands. This patch introduces new configuration options for more
fine-grained control for allowing/disallowing protocols. This also has
the added benefit of allowing easier construction of a protocol
whitelist on systems where setting an environment variable is
non-trivial.
Now users can specify a policy to be used for each type of protocol via
the 'protocol.<name>.allow' config option. A default policy for all
unconfigured protocols can be set with the 'protocol.allow' config
option. If no user configured default is made git will allow known-safe
protocols (http, https, git, ssh, file), disallow known-dangerous
protocols (ext), and have a default policy of `user` for all other
protocols.
The supported policies are `always`, `never`, and `user`. The `user`
policy can be used to configure a protocol to be usable when explicitly
used by a user, while disallowing it for commands which run
clone/fetch/push commands without direct user intervention (e.g.
recursive initialization of submodules). Commands which can potentially
clone/fetch/push from untrusted repositories without user intervention
can export `GIT_PROTOCOL_FROM_USER` with a value of '0' to prevent
protocols configured to the `user` policy from being used.
Fix remote-ext tests to use the new config to allow the ext
protocol to be tested.
Based on a patch by Jeff King <peff@peff.net>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-12-15 09:29:13 -08:00
..
2016-06-27 06:11:57 -07:00
2016-09-08 21:37:59 -07:00
2016-09-08 21:35:57 -07:00
2013-02-02 21:46:52 -08:00
2013-02-01 13:53:25 -08:00
2016-01-12 15:16:54 -08:00
2013-04-03 16:14:19 -07:00
2015-05-21 13:03:37 -07:00
2016-06-28 08:36:45 -07:00
2016-12-15 09:29:13 -08:00
2016-06-08 12:04:37 -07:00
2016-07-28 11:25:54 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2016-08-08 14:21:44 -07:00
2010-08-20 10:53:56 -07:00
2016-05-09 15:44:14 -07:00
2016-07-28 11:25:54 -07:00
2015-05-28 12:38:46 -07:00
2016-01-21 09:06:35 -08:00
2016-06-28 08:36:45 -07:00
2011-07-06 14:26:26 -07:00
2016-03-24 10:16:52 -07:00
2013-02-01 13:53:33 -08:00
2014-02-28 09:55:35 -08:00
2016-06-08 12:04:37 -07:00
2016-06-28 08:36:45 -07:00
2015-12-16 10:18:34 -08:00
2016-06-28 08:36:45 -07:00
2016-02-01 13:07:41 -08:00
2016-06-28 08:36:45 -07:00
2015-10-16 15:27:52 -07:00
2016-05-09 15:44:14 -07:00
2013-07-13 10:19:37 -07:00
2015-12-11 11:14:15 -08:00
2011-03-11 10:59:16 -05:00
2016-06-28 08:20:52 -07:00
2016-07-28 11:25:54 -07:00
2013-11-27 12:16:49 -08:00
2011-07-06 14:26:26 -07:00
2016-06-28 08:20:52 -07:00
2016-07-11 10:44:12 -07:00
2014-01-27 08:34:34 -08:00
2016-07-28 11:25:54 -07:00
2016-07-28 11:25:54 -07:00
2016-09-08 21:35:56 -07:00
2014-03-31 15:16:22 -07:00
2014-09-16 11:11:58 -07:00
2016-02-23 12:56:27 -08:00
2016-06-28 08:36:45 -07:00
2013-09-06 14:49:06 -07:00
2013-02-01 13:53:33 -08:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2011-07-06 14:26:26 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2014-03-31 15:16:22 -07:00
2016-06-28 08:36:45 -07:00
2015-05-12 22:14:46 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2015-11-04 14:20:45 -08:00
2016-06-28 08:36:45 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2016-07-06 13:06:34 -07:00
2011-07-06 14:26:26 -07:00
2016-06-28 08:36:45 -07:00
2016-06-08 12:04:55 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2016-06-08 12:04:37 -07:00
2013-02-01 13:53:33 -08:00
2016-06-28 08:36:45 -07:00
2015-03-10 15:19:05 -07:00
2013-05-28 08:07:20 -07:00
2013-02-01 13:53:33 -08:00
2016-07-06 13:06:34 -07:00
2016-06-08 12:04:55 -07:00
2016-06-28 08:36:45 -07:00
2016-07-06 13:06:34 -07:00
2016-06-28 08:36:45 -07:00
2016-01-19 10:07:56 -08:00
2016-06-28 08:36:45 -07:00
2016-05-26 13:17:14 -07:00
2011-07-06 14:26:26 -07:00
2013-10-29 13:06:08 -07:00
2015-10-29 12:10:23 -07:00
2013-04-15 11:08:37 -07:00
2011-07-06 14:26:26 -07:00
2013-09-04 15:02:56 -07:00
2016-04-21 11:58:51 -07:00
2013-02-01 13:53:33 -08:00
2014-04-24 11:29:05 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:20:52 -07:00
2016-06-28 08:20:52 -07:00
2013-09-04 15:03:03 -07:00
2016-06-28 08:20:52 -07:00
2016-07-28 11:25:54 -07:00
2016-08-10 10:55:13 -07:00
2011-07-06 14:26:26 -07:00
2013-07-18 16:23:46 -07:00
2011-07-06 14:26:26 -07:00
2015-10-16 15:27:52 -07:00
2014-10-13 13:35:18 -07:00
2015-06-29 08:48:44 -07:00
2016-03-21 13:30:36 -07:00
2016-09-08 21:35:53 -07:00
2016-06-08 12:04:37 -07:00
2014-05-21 13:57:10 -07:00
2016-07-28 11:25:54 -07:00
2015-03-13 22:13:46 -07:00
2015-07-21 14:08:14 -07:00
2011-07-06 14:26:26 -07:00
2014-11-11 14:47:04 -08:00
2014-11-11 14:47:04 -08:00
2013-02-01 14:12:34 -08:00
2013-02-07 14:41:45 -08:00
2016-06-28 08:36:45 -07:00
2016-08-10 10:55:13 -07:00
2016-06-08 12:04:37 -07:00
2015-09-14 12:50:33 -07:00
2015-03-13 22:13:46 -07:00
2014-04-08 12:00:28 -07:00
2015-10-05 12:30:13 -07:00
2015-07-15 10:30:54 -07:00
2016-06-28 08:36:45 -07:00
2014-01-07 14:34:06 -08:00
2016-07-28 11:25:54 -07:00
2016-06-28 08:36:45 -07:00
2012-03-28 11:18:35 -07:00
2011-09-11 21:52:18 -07:00
2016-06-08 12:04:37 -07:00
2016-06-28 08:20:52 -07:00
2013-04-21 23:11:02 -07:00
2016-06-28 08:36:45 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2015-05-12 22:14:46 -07:00
2014-10-13 13:35:18 -07:00
2015-08-31 11:29:04 -07:00
2015-09-21 10:48:23 -07:00
2015-10-16 15:27:52 -07:00
2016-05-17 14:38:20 -07:00
2016-07-28 11:25:54 -07:00
2012-10-21 12:17:38 -07:00
2016-07-28 11:25:54 -07:00
2015-07-28 13:21:59 -07:00
2011-07-06 14:26:26 -07:00
2015-10-16 15:27:52 -07:00
2016-06-28 08:36:45 -07:00
2015-07-21 14:08:35 -07:00
2011-07-06 14:26:26 -07:00
2015-10-22 10:16:12 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2016-07-06 13:06:36 -07:00
2015-05-17 11:24:57 -07:00
2015-06-22 14:20:47 -07:00
2016-06-28 08:36:45 -07:00
2013-08-13 09:01:54 -07:00
2016-03-29 11:12:36 -07:00
2011-07-06 14:26:26 -07:00
2016-12-15 09:29:13 -08:00
2016-09-08 21:35:52 -07:00
2014-05-21 13:57:10 -07:00
2016-06-28 08:36:45 -07:00
2016-02-26 10:58:14 -08:00
2014-10-10 16:02:26 -07:00
2016-06-28 08:36:45 -07:00
2015-10-22 10:14:44 -07:00
2014-10-10 16:02:26 -07:00
2016-05-04 16:25:13 -07:00
2016-06-08 12:04:55 -07:00
2016-06-28 08:36:45 -07:00
2016-06-28 08:36:45 -07:00
2013-02-01 13:53:33 -08:00
2016-06-28 08:36:45 -07:00
2015-07-20 11:07:18 -07:00
2015-10-22 10:16:12 -07:00
2014-11-19 13:47:59 -08:00
2016-02-01 13:07:41 -08:00
2016-06-08 12:04:37 -07:00
2016-06-08 12:04:37 -07:00
2013-02-01 13:53:33 -08:00
2016-05-18 14:40:14 -07:00
2014-04-17 11:14:57 -07:00
2015-07-01 14:55:53 -07:00
2011-11-08 13:37:10 -08:00
2014-04-17 11:14:58 -07:00
2015-04-20 11:05:50 -07:00
2016-05-10 11:15:04 -07:00
2013-01-05 23:41:42 -08:00
2016-06-17 11:39:05 -07:00
2016-06-08 12:04:37 -07:00
2016-05-17 14:38:39 -07:00
2016-02-22 10:42:52 -08:00
2016-07-22 13:47:33 -07:00
2016-07-06 13:06:34 -07:00
2014-06-12 09:59:13 -07:00
2016-09-08 21:35:52 -07:00
2016-06-28 08:36:45 -07:00
2011-11-22 18:16:59 -08:00
2016-08-26 15:58:10 -07:00
2015-10-22 10:16:12 -07:00
2016-02-01 13:07:41 -08:00
2012-08-07 14:30:52 -07:00
2016-03-03 13:43:36 -08:00