mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-19 19:23:39 +09:00
fix(user): unify email validation for registration and settings (#39304)
Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
co-authored by
silverwind
wxiaoguang
parent
c6c671e113
commit
7ebb2caa9e
@@ -46,6 +46,7 @@ func TestRegisterForm_IsDomainAllowed_AllowedEmail(t *testing.T) {
|
||||
}{
|
||||
{"security@gitea.io", true},
|
||||
{"security@gITea.io", true},
|
||||
{"hack%evil.example@gitea.io", false},
|
||||
{"invalid", false},
|
||||
{"seee@example.com", false},
|
||||
|
||||
@@ -69,6 +70,7 @@ func TestRegisterForm_IsDomainAllowed_BlockedEmail(t *testing.T) {
|
||||
}{
|
||||
{"security@gitea.io", false},
|
||||
{"security@gitea.example", true},
|
||||
{"gitea.io!hack@gitea.example", false},
|
||||
{"invalid", true},
|
||||
|
||||
{"user@my.block", false},
|
||||
|
||||
Reference in New Issue
Block a user