• Slava Koyfman's avatar
    Disconnect pub-sub subscribers when revoking `allchannels` permission (#11992) · 12634853
    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.
    
    (cherry picked from commit f38aa6bf)
    (cherry picked from commit 9caeadb8661f5fabd8386e3f07d445fe6ca46e7f)
    12634853
acl.c 87.8 KB