Thanks to visit codestin.com
Credit goes to github.com

Skip to content

site: restrict allowed characters in CreateGroupRequest.Name to ^[a-zA-Z0-9][a-zA-Z0-9\-]* #13354

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

Closed
johnstcn opened this issue May 23, 2024 · 7 comments · Fixed by #16115
Closed
Assignees
Labels
good first issue Easily solved issues suitable for starters and community contributors s3 Bugs that confuse, annoy, or are purely cosmetic site Area: frontend dashboard

Comments

@johnstcn
Copy link
Member

johnstcn commented May 23, 2024

Currently when creating a group we do not place any restrictions on the Name field in the UI.

However, when you then go to edit the group the restriction on the Name field blocks any further edits until the name is updated. We should enforce this restriction uniformly.

(Note: this only counts for Name, and not DisplayName).

@coder-labeler coder-labeler bot added api Area: HTTP API bug s3 Bugs that confuse, annoy, or are purely cosmetic labels May 23, 2024
@johnstcn
Copy link
Member Author

Screenshot 2024-05-23 at 15 18 50

@johnstcn johnstcn added the good first issue Easily solved issues suitable for starters and community contributors label Aug 23, 2024
@dudeitscesar
Copy link

dudeitscesar commented Sep 16, 2024

Hello @johnstcn, I was going to attempt to tackle this as my first Go contribution, but it appears to already have been fixed by PR #13596 using the regex ^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$ (UsernameValidRegex)

I think this can be closed? I'll have to try a different first issue to tackle :)

@mtojek
Copy link
Member

mtojek commented Sep 18, 2024

ping @johnstcn

@johnstcn johnstcn changed the title restrict allowed characters in CreateGroupRequest.Name to ^[a-zA-Z0-9][a-zA-Z0-9\-]* site: restrict allowed characters in CreateGroupRequest.Name to ^[a-zA-Z0-9][a-zA-Z0-9\-]* Sep 18, 2024
@johnstcn johnstcn added site Area: frontend dashboard and removed api Area: HTTP API labels Sep 18, 2024
@johnstcn
Copy link
Member Author

@dudeitscesar @mtojek this is in the TS frontend, not the backend.

@ericji1326
Copy link

Hi! @johnstcn! I am a new and eager OSS contributor. I am interested in tackling this as my first contribution! Is this an urgent issue/may I try to work on this?

@johnstcn
Copy link
Member Author

@ericji1326 go for it!

@matifali matifali removed the bug label Oct 14, 2024
@fool1280
Copy link

Hi, can I attempt on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easily solved issues suitable for starters and community contributors s3 Bugs that confuse, annoy, or are purely cosmetic site Area: frontend dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants