]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/get: disallow non-ASCII unicode letters from import paths
authorMichael Matloob <matloob@golang.org>
Mon, 31 Aug 2020 20:12:35 +0000 (16:12 -0400)
committerMichael Matloob <matloob@golang.org>
Tue, 1 Sep 2020 19:10:59 +0000 (19:10 +0000)
commit829ca10f9205ee57158062de823121624deb8988
tree6e0944918b38c7123ce0b1da568df04468fca721
parentab88d97deb216cdd93712dedca3be4d7a561743e
cmd/go/internal/get: disallow non-ASCII unicode letters from import paths

The copy of CheckImportPath in path.go and the regular expression for github
repos in vcsPaths together allow import paths with unicode letters with import
paths. These all come from github repos with non-ASCII unicode letters
with paths in directories. This mainly shows up in GOPATH mode, but could
also show up in Module mode when getting a module in GOPROXY=direct mode.

We expect there to not be any significant affected users of this change--
an investingation of github repos that would produce import paths that
would comply with the copy CheckImportPaths that's being removed, but not
modload.CheckImportPaths only surfaced a handful of cases, all of which
seemed to be small test or demonstation repos. But this CL is being
submitted early in the cycle so that it can be backed out if need be.

Updates #29101

Change-Id: I719df4af5b318e1330e90d8a0bffe5bb8d816f4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/251878
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/get/get.go
src/cmd/go/internal/get/path.go [deleted file]
src/cmd/go/internal/get/vcs.go