-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go get panics in GOPATH mode on custom import path with an insecure redirect #34049
Comments
A problem is here: go/src/cmd/go/internal/get/vcs.go Lines 905 to 908 in cc8838d
Accessing Luckily, this is a problem that will only occur when Edit: There is another problem, see my comment below. /cc @bcmills @jayconrod |
Edit: Go 1.12.9 behavior here was sub-optimal. See issue #29591. Go 1.13 behavior of rejecting the redirect to plain-HTTP without With Go 1.12.9, the entire command succeeds:
I picked |
As @heschik pointed out to me, one of the properties that makes the
In the original log, a part that stands out is:
One possible explanation is that something is causing the URL scheme to get dropped, which then makes it default to http (instead of https), causing "redirected from secure URL https://v2ray.com/core?go-get=1 to insecure URL http://www.v2ray.com/core/?go-get=1" , then Some evidence that supports the above is that using the
|
Change https://golang.org/cl/193259 mentions this issue: |
@gopherbot, please backport to 1.13. This panic makes insecure redirects much harder to diagnose, and the fix is trivial. |
Backport issue(s) opened: #34081 (for 1.13). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
With CL 193259 patched in, the reason for the failure becomes clearer:
|
Change https://golang.org/cl/193264 mentions this issue: |
…ails Fixes golang#34049 Change-Id: I817b83ee2d0ca6d01ec64998f14bc4f32e365d66 Reviewed-on: https://go-review.googlesource.com/c/go/+/193259 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
…tsForPrefix if web.Get fails Updates #29591 Updates #34049 Fixes #34081 Change-Id: I817b83ee2d0ca6d01ec64998f14bc4f32e365d66 Reviewed-on: https://go-review.googlesource.com/c/go/+/193259 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> (cherry picked from commit 1eab1aa6ba6c3f4d6f084751bca9a065707c3085) Reviewed-on: https://go-review.googlesource.com/c/go/+/193264 Reviewed-by: Jay Conrod <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
GO111MODULE=off go get
What did you expect to see?
Successful go get execution
What did you see instead?
Panic.
Note: this works in GO111MODULE=on
The text was updated successfully, but these errors were encountered: