Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/code: reject pseduo-versions from non-master branches
The intention of the current ModuleHandler is to serve only v0.0.0 pseudo-versions from commits that are on the master branch. This requires checking the commit hash component of the incoming module request, and verifying that the corresponding commit is a part of the master branch. This wasn't done previously, which means an explicit request to a pseudo-version based on a commit on non-master branch would be served by ModuleHandler as if such a version existed on the master branch. No non-master branches were ever pushed, and pseudo-versions based on commits on non-master branches were never advertised by the list endpoint. As a result, unintentional versions were not indexed by the Go module mirror. Updates golang/go#24031.
- Loading branch information
Showing
6 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+301 Bytes
...sitories/dmitri.shuralyov.com/kebabcase/objects/a0/40d5e5144e7d8b243238c40a3cbbdb5331d4bd
Binary file not shown.
Binary file added
BIN
+86 Bytes
...sitories/dmitri.shuralyov.com/kebabcase/objects/c4/66b17874c06ad8ed4f162206d3d94dac08cdca
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...sitories/dmitri.shuralyov.com/kebabcase/objects/c6/1324d16db7fa26c252edfb6305dfc2a22e06f5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
internal/code/testdata/repositories/dmitri.shuralyov.com/kebabcase/refs/heads/branch2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c61324d16db7fa26c252edfb6305dfc2a22e06f5 |