Skip to content

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

Open
@xuzhijvn

Description

@xuzhijvn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions