Skip to content

[BUG] rooms.info returns HTTP 500 for nonexistent rooms #42540

Open

Description

@eshanthh

Description:

The rooms.info REST API endpoint throws an internal server error when the requested room does not exist.

When findRoomByIdOrName() returns null, the endpoint currently passes that value to isPublicRoom() and isPrivateRoom(). These helpers access room.t, causing a null dereference.

Steps to reproduce:

  1. Start a Rocket.Chat server.
  2. Create or use a valid user account.
  3. Authenticate and obtain a user ID and authentication token.
  4. Send the following request with a nonexistent room ID:
GET /api/v1/rooms.info?roomId=000000000000000000000000
X-User-Id: <user-id>
X-Auth-Token: <auth-token>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions