-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Over-zealous username validation in UI #4150
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
Comments
|
gitea currently allows I'm interested to know what security issues might arise from the username containing unexpected characters... I'd hope that all such fields were only ever used with appropriate escaping, with parameterized queries etc to avoid sql injection and similar issues. I'd obviously be keen to keep |
What’s your opinion on allowing |
Also quite risky to break something. Would all git clients support such urls? |
TL; DR: don’t know…
|
I do think that we should stick to current behaviour to not break things and keep compatibility with future changes (especially if we implement projects/groups under organizations). |
I need "-" to work in org name when transferring repo between orgs. When trying to transfer repository from "cwinfo-private" to "warengroup-private". UI will show error "The new owner name is not valid." |
I think we should align our validation for org and repo name to a common denominator among forges like GitHub/GitLab. GitHub for example allow The most accurate description of what is allowed in repos is this:
For orgs:
|
So maybe these, and they could be made configurable I suppose.
|
[x]
):Description
We use kerberos via apache to authenticate hosts to gitea. Hosts have kerberos principals of the form
git/[email protected]
which get translated to the usernamegit/host.example.com
When we set
ENABLE_REVERSE_PROXY_AUTO_REGISTRATION
totrue
then these accounts are correctly created in gitea when the host runs git commands against our server. However since the account is 'new' it is not in the appropriate teams, so the first run fails, and we then have to set up team membership etc and re-run the processes.To fix this I'm trying to pre-create these accounts using the UI - however when I try to create a new user with name
git/host.example.com
I receive the errorUsername must be valid alphanumeric, dash(-_) or dot characters.
Since auto-generated usernames with these characters seem to work fine, would it be possible to alter this validation to allow a broader range of usernames, filtering only those which would make gitea actually fail?
The text was updated successfully, but these errors were encountered: