News for hackers. Stuff that matters.
Re:Reminder: secret_token.rb is named so for a reason by Ryoku on Wednesday December 26, 2012 @04:44PM (#4971071)
Well, in order to protect the hashes in said cookies you would end up doing something similar to prevent malicious users from just spoofing them. If you use id/hash tables the way you propose the hash is acting just like an id and is then vulnerable to the same issues. The problem is not that the id is there, but that you need a method to make it hard to spoof.
Re:Reminder: secret_token.rb is named so for a reason by bgdam on Thursday December 27, 2012 @06:19PM (#4975592)
No, you have mosunderstood me. I'm NOT storing a hash in the cookie. Instead im storing a random string. Because this string is random, there is no way that a malicious user can guess what the session code will be for a particular user id.