Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure cookie flag forced #20

Closed
mig-hub opened this issue Apr 15, 2011 · 2 comments
Closed

Secure cookie flag forced #20

mig-hub opened this issue Apr 15, 2011 · 2 comments

Comments

@mig-hub
Copy link

mig-hub commented Apr 15, 2011

Hello,

I wanted to talk to you about a problem I had with SslEnforcer recently. I could fork it and make a pull request as it is easy to change but I wanted to have your opinion before.

Basically I needed to share a cookie based session between http and https on an application and the only way I found so far is to have a non secure cookie. Unfortunately SslEnforcer inevitably sets the secure flag on cookies.

I perfectly understand why the flag is forced and the security breach behind that but I thought that leaving the option (obviously defaulting to false) would not be that bad considering the fact that it is still possible to encode the information by passing a coder class to Rack::Session::Cookie with the :coder option.
https://github.com/rack/rack/blob/master/lib/rack/session/cookie.rb#L28-42

Please let me know what you think about that.

Thank you very much,
mig

@thibaudgg
Copy link
Collaborator

Hello,

Yes I think it's ok to add this option is ok (with the false default like you said) if we add some documentation/warning about it. The pull request is welcome (as always!). Thanks!

@rymai
Copy link
Collaborator

rymai commented Apr 20, 2013

Closing this, feel free to open a pull-request, thanks!

@rymai rymai closed this as completed Apr 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants