Skip to content

Instantly share code, notes, and snippets.

@myobie
Created February 5, 2009 19:18
Show Gist options
  • Save myobie/58934 to your computer and use it in GitHub Desktop.
Save myobie/58934 to your computer and use it in GitHub Desktop.
# Hitting the homepage with cleared cookies:
Processing DocumentsController#home (for 71.191.200.199 at 2009-02-05 19:10:13) [GET]
Parameters: {"action"=>"home", "controller"=>"documents"}
$$ Logging the session to yaml:
--- !map:ActionController::Session::AbstractStore::SessionHash
:session_id: 4446f990e6c514e5d045b903761449e0
Rendering template within layouts/application
Rendering documents/home
Completed in 16ms (View: 4, DB: 0) | 200 OK [http://208.78.102.202/]
# Clicking My Account (which will redirect to login)
Processing UsersController#manage (for 71.191.200.199 at 2009-02-05 19:10:19) [GET]
Parameters: {"action"=>"manage", "controller"=>"users"}
$$ Logging the session to yaml:
--- !map:ActionController::Session::AbstractStore::SessionHash
:session_id: 4446f990e6c514e5d045b903761449e0
flash: !map:ActionController::Flash::FlashHash {}
Redirected to /session/new
Completed in 7ms (DB: 0) | 302 Found [http://208.78.102.202/manage]
# Showing the login form (redirect here)
Processing SessionsController#new (for 71.191.200.199 at 2009-02-05 19:10:20) [GET]
Parameters: {"action"=>"new", "controller"=>"sessions"}
$$ Logging the session to yaml:
--- !map:ActionController::Session::AbstractStore::SessionHash
:return_to: /manage
flash: !map:ActionController::Flash::FlashHash {}
:session_id: 4446f990e6c514e5d045b903761449e0
Rendering template within layouts/application
Rendering sessions/new
Completed in 35ms (View: 20, DB: 6) | 200 OK [http://208.78.102.202/session/new]
# Hitting login will attempt to create a session (by posting to the sessions controller)
Processing SessionsController#create (for 71.191.200.199 at 2009-02-05 19:10:29) [POST]
Parameters: {"action"=>"create", "authenticity_token"=>"[FILTERED]", "controller"=>"sessions", "password"=>"[FILTERED]", "email"=>"[FILTERED]"}
$$ Logging the session to yaml:
--- !map:ActionController::Session::AbstractStore::SessionHash
:_csrf_token: [FILTERED]
:return_to: /manage
:session_id: 4446f990e6c514e5d045b903761449e0
flash: !map:ActionController::Flash::FlashHash {}
$$$$ after session is messed with in SessionsController#create
--- !map:ActionController::Session::AbstractStore::SessionHash
:_csrf_token: NaXI3N4RuasDS7iZJxgUhignJ5z2UxU3amMjvFAF+8k=
:return_to: /manage
:user_id: 1
:session_id: 4446f990e6c514e5d045b903761449e0
flash: !map:ActionController::Flash::FlashHash {}
Redirected to /manage
Completed in 122ms (DB: 2) | 302 Found [http://208.78.102.202/session]
# Notice above that `:user_id: 1` is part of the session right before being redirected. Now it will redirect back to My Account.
Processing UsersController#manage (for 71.191.200.199 at 2009-02-05 19:10:29) [GET]
Parameters: {"action"=>"manage", "controller"=>"users"}
$$ Logging the session to yaml:
--- !map:ActionController::Session::AbstractStore::SessionHash
:_csrf_token: [FILTERED]
:return_to: /manage
:session_id: 4446f990e6c514e5d045b903761449e0
flash: !map:ActionController::Flash::FlashHash {}
Redirected to /session/new
Completed in 7ms (DB: 0) | 302 Found [http://208.78.102.202/manage]
# Now, the `:user_id: 1` is no longer in the session, so it will again redirect to login... and the cycle continues
Processing SessionsController#new (for 71.191.200.199 at 2009-02-05 19:10:29) [GET]
Parameters: {"action"=>"new", "controller"=>"sessions"}
$$ Logging the session to yaml:
--- !map:ActionController::Session::AbstractStore::SessionHash
:_csrf_token: NaXI3N4RuasDS7iZJxgUhignJ5z2UxU3amMjvFAF+8k=
:return_to: /manage
flash: !map:ActionController::Flash::FlashHash {}
:session_id: 4446f990e6c514e5d045b903761449e0
Rendering template within layouts/application
Rendering sessions/new
Completed in 9ms (View: 6, DB: 0) | 200 OK [http://208.78.102.202/session/new]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment