openimsdk / chat

A business server that includes user registration and login, deployed together with Open-IM-Server, can be used to set up a chat product.
https://openim.io
GNU General Public License v3.0
90 stars 112 forks source link

[BUG] when chat not set sms and email, reset password use supercode, tiggered error #566

Closed ouyangdage closed 1 day ago

ouyangdage commented 3 months ago

OpenIM Server Version

chat 1.8.0

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

[version:v1.8.0]
[mw/rpc_server_interceptor.go:107]
rpc InternalServer error
{"operationID": "1723092996996", "funcName": "/openim.chat.chat/ResetPassword", "req": "verifyCode:\"666666\" password:\"88c393ef2b6a8dcf243847f05fbdbe4b\" email:\"**@***.com\"", "error": "Error: the provided hex string is not a valid ObjectID | Error trace: 1 (/pkg/mod/google.golang.org/grpc@v1.62.1/server.go:1027) -> handleStream (/pkg/mod/google.golang.org/grpc@v1.62.1/server.go:1797) -> processUnaryRPC (/pkg/mod/google.golang.org/grpc@v1.62.1/server.go:1386) -> _Chat_ResetPassword_Handler (//chat/pkg/protocol/chat/chat.pb.go:4459) -> RpcServerInterceptor (/pkg/mod/github.com/openimsdk/tools@v0.0.49-alpha.24/mw/rpc_server_interceptor.go:59) -> func1 (//chat/pkg/protocol/chat/chat.pb.go:4457) -> ResetPassword (//chat/internal/rpc/chat/password.go:54) -> UpdatePasswordAndDeleteVerifyCode (//chat/pkg/common/db/database/chat.go:242) -> Transaction (/pkg/mod/github.com/openimsdk/tools@v0.0.49-alpha.24/db/mongoutil/tx.go:70) -> func1 (//chat/pkg/common/db/database/chat.go:246) -> Delete (//chat/pkg/common/db/model/chat/verify_code.go:140) -> parseID (//chat/pkg/common/db/model/chat/verify_code.go:66) -> Wrap (/pkg/mod/github.com/openimsdk/tools@v0.0.49-alpha.24/errs/coderr.go:126)"}

when chat not set sms and email, reset password use supercode, the error will tiggered

Screenshots Link

No response

icey-yu commented 1 day ago

Thank you for submitting the PR. We apologize for the delayed response to your issue, but we have already resolved it in a later version. Thank you again for your contribution to the project. https://github.com/openimsdk/chat/issues/594