]> Cypherpunks repositories - gostls13.git/commit
cmd/go: restrict meta imports to valid schemes
authorIan Lance Taylor <iant@golang.org>
Thu, 15 Feb 2018 23:57:13 +0000 (15:57 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 16 Feb 2018 19:28:41 +0000 (19:28 +0000)
commitc941e27e70c3e06e1011d2dd71d72a7a06a9bcbc
tree5c9a5a9a38627e20b752116f2621627c13650b55
parent0db53dede6f55f12a7e66d71f8c725cd200c3f54
cmd/go: restrict meta imports to valid schemes

Before this change, when using -insecure, we permitted any meta import
repo root as long as it contained "://". When not using -insecure, we
restrict meta import repo roots to be valid URLs. People may depend on
that somehow, so permit meta import repo roots to be invalid URLs, but
require them to have valid schemes per RFC 3986.

Fixes #23867

Change-Id: Iac666dfc75ac321bf8639dda5b0dba7c8840922d
Reviewed-on: https://go-review.googlesource.com/94603
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/internal/get/vcs.go
src/cmd/go/internal/get/vcs_test.go