Skip to content

Commit

Permalink
Merge pull request rails#24284 from olivierlacan/patch-1
Browse files Browse the repository at this point in the history
Remove reference to unmaintained plugin/gem in Security guide
  • Loading branch information
rafaelfranca committed Mar 23, 2016
2 parents 7e7721d + a2df57c commit d7647e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The most effective countermeasure is to _issue a new session identifier_ and dec
reset_session
```

If you use the popular RestfulAuthentication plugin for user management, add reset_session to the SessionsController#create action. Note that this removes any value from the session, _you have to transfer them to the new session_.
If you use the popular [Devise](https://rubygems.org/gems/devise) gem for user management, it will automatically expire sessions on sign in and sign out for you. If you roll your own, remember to expire the session after your sign in action (when the session is created). This will remove values from the session, therefore _you will have to transfer them to the new session_.

Another countermeasure is to _save user-specific properties in the session_, verify them every time a request comes in, and deny access, if the information does not match. Such properties could be the remote IP address or the user agent (the web browser name), though the latter is less user-specific. When saving the IP address, you have to bear in mind that there are Internet service providers or large organizations that put their users behind proxies. _These might change over the course of a session_, so these users will not be able to use your application, or only in a limited way.

Expand Down

0 comments on commit d7647e9

Please sign in to comment.