Compare commits
1 Commits
dev
...
d731a0af8c
Author | SHA1 | Date | |
---|---|---|---|
d731a0af8c
|
@@ -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+@(\\w){2,}((\\.\\w+)+)$", username)
|
||||
matched, err := regexp.MatchString("^(\\w){3,}(\\.\\w+)*@(\\w){2,}((\\.\\w+)+)$", username)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -410,7 +410,7 @@ func (u *userServiceImpl) ProfileKey(accessToken string) (resp *ProfileKeyRespon
|
||||
resp = new(ProfileKeyResponse)
|
||||
now := time.Now().UTC()
|
||||
resp.RefreshedAfter = now
|
||||
resp.ExpiresAt = now.Add(90 * 24 * time.Hour)
|
||||
resp.ExpiresAt = now.Add(10 * time.Minute)
|
||||
keyPair, err := u.getProfileKey(profileId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user