Skip to content
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

x/pkgsite: support @branch for branch names other than "master" and "main" #46914

Open
mvdan opened this issue Jun 24, 2021 · 2 comments
Open

x/pkgsite: support @branch for branch names other than "master" and "main" #46914

mvdan opened this issue Jun 24, 2021 · 2 comments

Comments

@mvdan
Copy link
Member

@mvdan mvdan commented Jun 24, 2021

Splitting off from #41312 (comment):

We're still open to a contribution for supporting non-master and non-main branch names.

That issue is originally about supporting default branches, like git's HEAD. This issue is separate; it's about supporting specific branch names that exist in VCS. Presumably this should be easier to implement, as the module proxy already supports listing the versions for any VCS branch.

cc @jba @julieqiu

@gopherbot gopherbot added this to the Unreleased milestone Jun 24, 2021
@jba jba added the NeedsFix label Jun 25, 2021
@jba jba removed this from the Unreleased milestone Jun 25, 2021
@jba jba added this to the pkgsite/unplanned milestone Jun 25, 2021
@mvdan
Copy link
Member Author

@mvdan mvdan commented Jun 26, 2021

@julieqiu I took a look at what you did for main in golang/pkgsite@91e83ca. What kind of change would we make for arbitrary branch names? It's not clear to me, because isSupportedVersion would have to always return true for any string that could be a branch name.

I also see ScheduleFetch calls for branch queries, and I wonder if arbitrary branch names could case DoS-like attacks. For example, I could query for @b001, then @b002, @b003, etc. This kind of spamming is already possible with master and main though, and it seems like every branch request causes a scheduling, so this might not make matters worse.

@mvdan
Copy link
Member Author

@mvdan mvdan commented Aug 31, 2021

I've opened a sibling issue for @some-commit here: #48100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants