News for hackers. Stuff that matters.
Re:CSRF protection bypass due to Google analytics and weird ... by xrstf on Monday May 04, 2015 @04:05PM (#9488756)
It is. I want to finally understand why and how I can secure a login form against CSRF (i.e. when I don't yet have a session for the visitor).
Re:CSRF protection bypass due to Google analytics and weird ... by Osiris on Monday May 04, 2015 @04:45PM (#9489060)
How we do it is a little wonky. Our web app calls GET /login which returns a CSRF cookie and an anonymous session cookie and an object that says there's no active session. The app then uses that CSRF token to POST to /login. Once the auth is successful, the anonymous session is destroyed and a new CSRF secret is generated on the authenticated session.