Skip to content

revoked subscriptions keep delivering after session resume #173

Description

@fabracht

Found in the PR #170 review, with a failing test.

Defect: on session resume, restore_existing_session (client_handler/connect.rs) removes subscriptions the client is no longer authorised for from the stored session. But the router kept them since the preserving disconnect (release_client keeps subscriptions), and nothing unsubscribes them.

Effect: a resumed client keeps receiving messages on a topic filter whose ACL was revoked while it was offline.

Fix: remove the revoked filters from the router as well when the session is restored, or re-install the router subscriptions only from the filtered set.

Test: a client subscribes to secret/#, disconnects with a persistent session, the ACL for it is revoked, the client resumes, and it still receives secret/x.

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