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

dot is valid for username #2958

Merged
merged 2 commits into from
Mar 16, 2021
Merged

dot is valid for username #2958

merged 2 commits into from
Mar 16, 2021

Conversation

okian
Copy link

@okian okian commented Apr 29, 2020

Currently Drone doesn't allow (.) in username but thats valid (at least in gitlab)
example: https://gitlab.com/hadi.farnoud
Screenshot from 2020-04-30 00-59-45

@CLAassistant
Copy link

CLAassistant commented Apr 29, 2020

CLA assistant check
All committers have signed the CLA.

@@ -94,7 +94,7 @@ func (u *User) Validate() error {
switch {
case !govalidator.IsByteLength(u.Login, 1, 50):
return errUsernameLen
case !govalidator.Matches(u.Login, "^[a-zA-Z0-9_-]+$"):
case !govalidator.Matches(u.Login, "^[.a-zA-Z0-9_-]+$"):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about that, not should the dot be escaped?

Copy link
Author

@okian okian Apr 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can't be escaped inside brackets. also i add a test for it and it didn't break any previous cases.

@tboerger
Copy link

@bradrydzewski I guess this would be safe to merge?

@okian
Copy link
Author

okian commented Jul 5, 2020

@bradrydzewski @tboerger Any update on this?

@hadifarnoud
Copy link

I'm also waiting on this guys @tboerger @bradrydzewski

@tphoney tphoney merged commit 6b27829 into harness:master Mar 16, 2021
@tphoney
Copy link

tphoney commented Mar 16, 2021

Thanks for you patience everyone and special thanks to @okian for the fix and tests. 🎆

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

Successfully merging this pull request may close these issues.

None yet

5 participants