Skip to content

Properly handle SUBSCRIBE errors #387

Open

Description

@anarthal

I've recently learned that SUBSCRIBE may error under circumstances other than a syntax error. For instance, when using ACL, the server returns an error if the user doesn't have access to the requested channels.

I think we need to improve how we handle these errors. Currently, in the best scenario, they're interpreted as pushes as put into the receive response. But if other commands are on the flight, they will be interpreted as errors to these commands, completely messing up the connection. I can see attackers somehow crafting channel names to exploit this.

I've seen that SUBSCRIBE immediately returns a push with a certain response. My proposal is attempting to identify this push (or the corresponding error), and fail the request if an error is seen.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions