Skip to content

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

@dentarg

Description

@dentarg

This default value

RACK_SESSION = 'rack.session'

key: RACK_SESSION,

Isn't used when configuring the Encryptor class:

encryptor_opts = {
purpose: options[:key], serialize_json: options[:serialize_json]
}

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:

def compute_signature(data)
signing_data = data
signing_data += @options[:purpose] if @options[:purpose]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions