-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
#22041
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
#22041
Conversation
Thanks for the PR but you really need to give it a MUCH BETTER title and describe the PR in a bit more detail. |
The email address is invalid
, entirely preventing the use of gitea)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should allow an email like 我的$#[email protected]
.
I don't agree with completely removing validation, but I would agree to using golang stdlib email validation which I suppose should support everything you want. |
Except the one thing that you haven't provided a rationale for is what it originally aimed to mitigate. https://github.com/go-gitea/gitea/blame/main/models/user/email_address.go -> #17688 A concern was raised with just a simple RFC_5322 check ( that ParseAddress does). The goal was to restrict the valid emails and an aim to refine in the future. One compromise is to load the regex string from config and thus if people do not want to restrict the email they have the flexibility |
I'm sorry if I made a mistake. I mean no unicode in the email address and I just post an example there not against any language. And since the issue has been mentioned many times I think you should read more previous issues or PRs before you post comments or PRs so that you can know the context. |
The email address is invalid
, entirely preventing the use of gitea)
I think we should be careful here to note that git will allow these extremely weird email addresses and Gitea will just use them. So by having this super-restrictive pattern we're not preventing weird and ambiguous email addresses from appearing in Gitea - just preventing the user from saying that one belongs to them. Further, the potential problem of email addresses being ambiguous/confusable with another user isn't really an issue as the Gitea will not show the email address and will show the user that they map to instead. Thus unicode ambiguity of email addresses should only affect the user who the ambiguous email address belongs to. Next we should consider if there are potential sec issues by allowing arbitrary email addresses.
As far as I can see the only person affected by Gitea allowing users to register their own weird email address is the user itself. And thus apart from blocking the initial |