diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-12-27 08:11:41 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-27 08:11:41 (GMT) |
commit | 9d540e97267fa94d9701d3e1aa5cdf2926858472 (patch) | |
tree | 692790eca6a1f1ed5dd56a0f336bf910e76d15e5 /t/t5550-http-fetch-dumb.sh | |
parent | 05f6e1be8cdae1ebedf3cf7b7a072a3b35f945b5 (diff) | |
parent | abcbdc03895ff3f00280e54af11fee92d6877044 (diff) | |
download | git-9d540e97267fa94d9701d3e1aa5cdf2926858472.zip git-9d540e97267fa94d9701d3e1aa5cdf2926858472.tar.gz git-9d540e97267fa94d9701d3e1aa5cdf2926858472.tar.bz2 |
Merge branch 'bw/transport-protocol-policy'
Finer-grained control of what protocols are allowed for transports
during clone/fetch/push have been enabled via a new configuration
mechanism.
* bw/transport-protocol-policy:
http: respect protocol.*.allow=user for http-alternates
transport: add from_user parameter to is_transport_allowed
http: create function to get curl allowed protocols
transport: add protocol policy config option
http: always warn if libcurl version is too old
lib-proto-disable: variable name fix
Diffstat (limited to 't/t5550-http-fetch-dumb.sh')
-rwxr-xr-x | t/t5550-http-fetch-dumb.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh index 264a1ab..aeb3a63 100755 --- a/t/t5550-http-fetch-dumb.sh +++ b/t/t5550-http-fetch-dumb.sh @@ -368,5 +368,15 @@ test_expect_success 'http-alternates cannot point at funny protocols' ' clone "$HTTPD_URL/dumb/evil.git" evil-file ' +test_expect_success 'http-alternates triggers not-from-user protocol check' ' + echo "$HTTPD_URL/dumb/victim.git/objects" \ + >"$evil/objects/info/http-alternates" && + test_config_global http.followRedirects true && + test_must_fail git -c protocol.http.allow=user \ + clone $HTTPD_URL/dumb/evil.git evil-user && + git -c protocol.http.allow=always \ + clone $HTTPD_URL/dumb/evil.git evil-user +' + stop_httpd test_done |