From 865b436264e810933470fa37e616a53fcae5ac1f Mon Sep 17 00:00:00 2001 From: richjohnrambo Date: Tue, 22 Sep 2026 00:46:35 +0800 Subject: [PATCH] fix: skip challenge requirement for fixed test code --- server/user.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/user.go b/server/user.go index 4c95e22..a88a66b 100644 --- a/server/user.go +++ b/server/user.go @@ -164,7 +164,8 @@ func replyCreateUser(s *Session, msg *ClientComMessage, rec *auth.Rec) { } challengeID, _ = cr.Params["challenge_id"].(string) } - if phone == "" || strings.TrimSpace(challengeID) == "" || strings.TrimSpace(cr.Response) == "" || + fixedTestCode, _ := cr.Params["fixed_test_code"].(bool) + if phone == "" || (!fixedTestCode && strings.TrimSpace(challengeID) == "") || strings.TrimSpace(cr.Response) == "" || (registrationPhone != "" && registrationPhone != phone) { s.queueOut(decodeStoreError(types.ErrCredentials, msg.Id, msg.Timestamp, map[string]any{"creds": []string{"tel"}}))