handleProtocolMessage() relayed every client-* frame to the named channel
before handleChannelSubscriptions() and shouldRejectMessage() ran, with no
membership check. Client messages are on by default, so a socket whose
private or presence subscribe was just refused, or one that never
subscribed, could push frames to every member. The "Subscription not
established" error went out only after the broadcast, and the frame was
then forked to a controller as well.
- A client event is relayed only when the sender is on the channel (or
tracked there, as shouldRejectMessage() allows). Otherwise the sender
gets "<event>:error" "Subscription not established".
- Either way the frame ends there: client events no longer reach a child.
- The legacy Server\WebSocketHandler applies the same membership check and
now honours enable_client_messages, which it ignored.
Members keep whispering on public, private and presence channels; the
Pusher rule that limits client events to private/presence channels is not
applied, so public-channel whispers keep working.
Tests: a non-member (and, for private-, private-encrypted- and presence-,
one whose subscribe was refused) gets the error and reaches no member;
members' client events still reach the others.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>