开发者

invalidate a cookie on password change

I use cookies to manage user sessions in my Rails app. I recently found that when a user changes the password, the cookie does not 开发者_JAVA百科get invalidated as expected. As you realize, this could be a great threat to security. How should I handle this problem? I want to expire or invalidate a cookie once the user changes the password. How do I do this in Rails. Thanks.


Destroy the session as you would on a logout; and ask the user to log back in.

http://api.rubyonrails.org/classes/ActionController/Base.html#M000474

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜