diff options
author | Kir Shatrov <kirs@users.noreply.github.com> | 2016-09-09 21:59:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-09 21:59:10 -0400 |
commit | 09d7bb95d0353419afcf1d379923bfde7cf4d482 (patch) | |
tree | c787ddd1305e9836bc929e6373af1e28e4b76cce | |
parent | 25a549883b85fb33970b4a1530a365c0c9e51f95 (diff) | |
download | rack-09d7bb95d0353419afcf1d379923bfde7cf4d482.tar.gz |
Freeze default session options
Some code in my app have been accidentally mutating the default session options, which broke some session behaviour. It wasn't easy to track that down, so I'd like to suggest that we freeze this hash to avoid mutation.
-rw-r--r-- | lib/rack/session/abstract/id.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/session/abstract/id.rb b/lib/rack/session/abstract/id.rb index 204bdb34..4c139637 100644 --- a/lib/rack/session/abstract/id.rb +++ b/lib/rack/session/abstract/id.rb @@ -200,7 +200,7 @@ module Rack :sidbits => 128, :cookie_only => true, :secure_random => ::SecureRandom - } + }.freeze attr_reader :key, :default_options, :sid_secure |