Skip to content
This repository

prevent crash when cookie doesn't contain "--" #523

Merged
merged 1 commit into from 12 months ago

4 participants

Brandon Dimcheff jaminben Santiago Pastorino Konstantin Haase
Brandon Dimcheff

This backports 881ce76 so that rack won't crash when there isn't a "--" in the rack_session cookie

Brandon Dimcheff prevent crash when cookie doesn't contain "--"
This backports 881ce76 so that rack
won't crash when there isn't a "--" in the rack_session cookie
18a6b88
Santiago Pastorino spastorino commented on the diff February 22, 2013
lib/rack/session/cookie.rb
@@ -55,7 +55,7 @@ def load_session(env)
2
Santiago Pastorino Collaborator

just checking for digest is enough

hmm I think that if the cookie is the empty string (and thus session_data is nil) it might error without session_data &&. I'll play around with the tests again in a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Santiago Pastorino
Collaborator

This one seems ok /cc @rkh @raggi

Konstantin Haase
Collaborator
rkh commented April 20, 2013

Except the tests fail.

Santiago Pastorino spastorino referenced this pull request from a commit April 22, 2013
Santiago Pastorino prevent crash when cookie doesn't contain "--"
This backports 881ce76 so that rack
won't crash when there isn't a "--" in the rack_session cookie

Fixes #523
a0ffb24
Santiago Pastorino spastorino referenced this pull request from a commit April 22, 2013
Santiago Pastorino prevent crash when cookie doesn't contain "--"
This backports 881ce76 so that rack
won't crash when there isn't a "--" in the rack_session cookie

Fixes #523

Conflicts:
	lib/rack/session/cookie.rb
	test/spec_session_cookie.rb
65d417e
Santiago Pastorino spastorino merged commit 4b640a0 into from April 22, 2013
Santiago Pastorino spastorino closed this April 22, 2013
Santiago Pastorino
Collaborator

For the record Travis is failing because rack-1.1 didn't have a Gemfile. Let's fix that ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 21, 2013
Brandon Dimcheff prevent crash when cookie doesn't contain "--"
This backports 881ce76 so that rack
won't crash when there isn't a "--" in the rack_session cookie
18a6b88
This page is out of date. Refresh to see the latest.
2  lib/rack/session/cookie.rb
@@ -55,7 +55,7 @@ def load_session(env)
5  test/spec_rack_session_cookie.rb
@@ -52,6 +52,11 @@
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.