Skip to content

[BUG] SearchMessage() method has potential NPE bug #3287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xuzhijvn opened this issue Apr 18, 2025 · 1 comment · May be fixed by #3289
Open

[BUG] SearchMessage() method has potential NPE bug #3287

xuzhijvn opened this issue Apr 18, 2025 · 1 comment · May be fixed by #3289
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@xuzhijvn
Copy link

xuzhijvn commented Apr 18, 2025

OpenIM Server Version

v3.8.3-patch.4

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

Because the method pkg/common/storage/database/mgo/msg.go:SearchMessage did not filter out empty messages, it means msgs[index].msg maybe nil, it leads to:

  1. There may be a NPE on line 168 of the method internal/rpc/msg/sync_msg.go:SearchMessage.
Image
  1. It is also incorrect that the query results contain empty messages themselves.

Screenshots Link

No response

@xuzhijvn xuzhijvn added the bug Categorizes issue or PR as related to a bug. label Apr 18, 2025
@OpenIM-Robot
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

Join slack 🤖 to connect and communicate with our developers.

@xuzhijvn xuzhijvn changed the title [BUG] [BUG] SearchMessage() method has potential NPE bug Apr 18, 2025
xuzhijvn pushed a commit to xuzhijvn/open-im-server that referenced this issue Apr 18, 2025
xuzhijvn pushed a commit to xuzhijvn/open-im-server that referenced this issue Apr 18, 2025
xuzhijvn pushed a commit to xuzhijvn/open-im-server that referenced this issue Apr 18, 2025
xuzhijvn added a commit to xuzhijvn/open-im-server that referenced this issue Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
2 participants