aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib
diff options
context:
space:
mode:
authorBlake Stoddard <blake.m.stoddard@gmail.com>2019-04-22 09:59:53 -0400
committerGeorge Claghorn <george@basecamp.com>2019-04-22 09:59:53 -0400
commit70d64169ae03eff911028be80b7f00bbb5784a67 (patch)
tree718d4a640597ffccea70eb53207e95cd46330dd4 /actioncable/lib
parent70e255b9f20ffa5d49b90cfaa4c30f5a53cc66a2 (diff)
downloadrails-70d64169ae03eff911028be80b7f00bbb5784a67.tar.gz
rails-70d64169ae03eff911028be80b7f00bbb5784a67.tar.bz2
rails-70d64169ae03eff911028be80b7f00bbb5784a67.zip
ActionCable: don't allowlist keys passed to the Redis initializer
Support all Redis features without needing to maintain a list of valid options that must stay in sync with the upstream client library.
Diffstat (limited to 'actioncable/lib')
-rw-r--r--actioncable/lib/action_cable/subscription_adapter/redis.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actioncable/lib/action_cable/subscription_adapter/redis.rb b/actioncable/lib/action_cable/subscription_adapter/redis.rb
index ad8fa52760..b4a9385c87 100644
--- a/actioncable/lib/action_cable/subscription_adapter/redis.rb
+++ b/actioncable/lib/action_cable/subscription_adapter/redis.rb
@@ -5,6 +5,8 @@ require "thread"
gem "redis", ">= 3", "< 5"
require "redis"
+require "active_support/core_ext/hash/except"
+
module ActionCable
module SubscriptionAdapter
class Redis < Base # :nodoc:
@@ -14,7 +16,7 @@ module ActionCable
# This is needed, for example, when using Makara proxies for distributed Redis.
cattr_accessor :redis_connector, default: ->(config) do
config[:id] ||= "ActionCable-PID-#{$$}"
- ::Redis.new(config.slice(:url, :host, :port, :db, :password, :id))
+ ::Redis.new(config.except(:adapter, :channel_prefix))
end
def initialize(*)