diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-02-18 12:31:04 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-08-19 13:00:39 -0400 |
commit | 831e2c8d1bf13cd944f5683980cfe95f59db2ae8 (patch) | |
tree | f77ecf4e47ac7da4fe55e40b99ce228892c2faee /actioncable/lib/action_cable | |
parent | c1d612cf5a9d25133ab50cc057ebb35d337e37fa (diff) | |
download | rails-831e2c8d1bf13cd944f5683980cfe95f59db2ae8.tar.gz rails-831e2c8d1bf13cd944f5683980cfe95f59db2ae8.tar.bz2 rails-831e2c8d1bf13cd944f5683980cfe95f59db2ae8.zip |
Prevent invocation of channel action if rejected connection
Fixes #23757.
Before this commit, even if `reject` was called in the `subscribe`
method for an Action Cable channel, all actions on that channel could
still be invoked. This calls a `return` if a rejected connection tries
to invoke any actions on the channel.
Diffstat (limited to 'actioncable/lib/action_cable')
-rw-r--r-- | actioncable/lib/action_cable/channel/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actioncable/lib/action_cable/channel/base.rb b/actioncable/lib/action_cable/channel/base.rb index 8ab061171e..2e589a2cfa 100644 --- a/actioncable/lib/action_cable/channel/base.rb +++ b/actioncable/lib/action_cable/channel/base.rb @@ -247,7 +247,7 @@ module ActionCable end def processable_action?(action) - self.class.action_methods.include?(action.to_s) + self.class.action_methods.include?(action.to_s) unless subscription_rejected? end def dispatch_action(action, data) |