rack-session icon indicating copy to clipboard operation
rack-session copied to clipboard

Make use of default key value when creating `Rack::Session::Encryptor`

Open dentarg opened this issue 1 year ago • 0 comments

This default value

https://github.com/rack/rack-session/blob/7a4e2dd5625b141e68bb35ecbca2ecae87155c76/lib/rack/session/constants.rb#L9 https://github.com/rack/rack-session/blob/7a4e2dd5625b141e68bb35ecbca2ecae87155c76/lib/rack/session/abstract/id.rb#L241

Isn't used when configuring the Encryptor class:

https://github.com/rack/rack-session/blob/7a4e2dd5625b141e68bb35ecbca2ecae87155c76/lib/rack/session/cookie.rb#L163-L165

use Rack::Session::Cookie and Rack::Session::Cookie, key: "rack.session" is the same, both give you a session cookie with key rack.session, but their signature will be different:

https://github.com/rack/rack-session/blob/7a4e2dd5625b141e68bb35ecbca2ecae87155c76/lib/rack/session/encryptor.rb#L183-L185

dentarg avatar Jan 17 '24 17:01 dentarg