projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bc3054
)
Don't reset the session when the token refers to an invalid user
author
Tom Hughes
<tom@compton.nu>
Mon, 7 Nov 2011 21:40:42 +0000
(21:40 +0000)
committer
Tom Hughes
<tom@compton.nu>
Mon, 14 Nov 2011 09:42:59 +0000
(09:42 +0000)
During account creation it is quite normal for the token in the
session to refer to a user that is not active yet.
app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/application_controller.rb
b/app/controllers/application_controller.rb
index c2f1e644c5f928fd8da86415f5cf0bb6361816c7..f07cacbd6cb121f96a29857781bd795875190f9c 100644
(file)
--- a/
app/controllers/application_controller.rb
+++ b/
app/controllers/application_controller.rb
@@
-40,8
+40,6
@@
class ApplicationController < ActionController::Base
elsif session[:token]
if @user = User.authenticate(:token => session[:token])
session[:user] = @user.id
- else
- reset_session
end
end
rescue Exception => ex