Would adding a HMAC string to the cookie value not get around this issue? For example, Tornado has the set_secure_cookie method (http://www.tornadoweb.org/en/stable/web.html#tornado.web.Req...), would this not prevent this sort of attack? Even if a script modified the cookies, they would never (well, hopefully never) be able to generate the correct HMAC token so the server could just discard the cookies. You'd still be able to sign a user out but there wouldn't be a security issue (I think). Anyone smart able to verify/refute?
jcampbell1|13 years ago
That would do absolutely nothing. Here are the attacks:
1) log a person out by replacing the session cookie
2) make github slower by making all requests have to send a large amount of cookie data.
3) Log someone in to one of the attackers accounts. For instance I can create an account like `jResîg`, and log people into that account.
Adding an HMAC prevents 0 of 3. Moving github pages to a different domain solves all three problems.
X-Istence|13 years ago
samarudge|13 years ago
duskwuff|13 years ago