Skip to content

[BUG] missing user type in chat #691

@userInner

Description

@userInner

OpenIM Server Version

v0.0.50-alpha.65

Operating System and CPU Architecture

Windows (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

Problem description:

Authorization verification of the server gRPC interface failed, and the log showed an error of "missing user type".
Root cause analysis:
After debugging, it was found that the gRPC interceptor (mw.RpcServerInterceptor, version v0.0.50-alpha.65) used on the server side had a defect. It can correctly parse opUserId from the metadata requested by the client and put it into the context, but completely misses the processing of opUserType.
This causes all gRPC calls that need to verify the user type to fail because userType cannot be found in the context.

Repair suggestion:

The code of the interceptor needs to be fixed so that it can correctly handle opUserType and set it to the context when processing the incoming metadata, just like handling opUserId.

Screenshots Link

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions