• Slava Koyfman's avatar
    Disconnect pub-sub subscribers when revoking `allchannels` permission (#11992) · f38aa6bf
    Slava Koyfman authored
    The existing logic for killing pub-sub clients did not handle the `allchannels`
    permission correctly. For example, if you:
    
        ACL SETUSER foo allchannels
    
    Have a client authenticate as the user `foo` and subscribe to a channel, and then:
    
        ACL SETUSER foo resetchannels
    
    The subscribed client would not be disconnected, though new clients under that user
    would be blocked from subscribing to any channels.
    
    This was caused by an incomplete optimization in `ACLKillPubsubClientsIfNeeded`
    checking whether the new channel permissions were a strict superset of the old ones.
    f38aa6bf
acl.c 121 KB