From 22fd87a07a15181f25c5938544970fba2324bb24 Mon Sep 17 00:00:00 2001 From: Gardel Date: Tue, 15 Jul 2025 23:13:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E6=AD=A3=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/user_service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/user_service.go b/service/user_service.go index f21bde2..e62d510 100644 --- a/service/user_service.go +++ b/service/user_service.go @@ -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 }