Compare commits

..

2 Commits

Author SHA1 Message Date
7c067839af feat: 添加 gitea 构建脚本
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 11m50s
2025-07-15 23:14:05 +08:00
22fd87a07a fix: 调整邮箱正则 2025-07-15 23:13:27 +08:00

View File

@@ -118,7 +118,7 @@ func (u *userServiceImpl) Register(username, password, profileName, ip string) (
} else if _, err := mojangUsernameToUUID(profileName); err == nil {
return nil, util.NewForbiddenOperationError("profileName duplicate")
}
matched, err := regexp.MatchString("^(\\w){3,}(\\.\\w+)*@(\\w){2,}((\\.\\w+)+)$", username)
matched, err := regexp.MatchString("^\\w+@(\\w){2,}((\\.\\w+)+)$", username)
if err != nil {
return nil, err
}