Message from JavaScript discussions

January 2018

— Oh yes, forgot


Https:// very good read for anyone integrating auth systems into their app

— Even if you don't write any auth code yourself, there are still a lot of places that are easy to accidentally open a hole in the app infrastructure

Message permanent page

— Thanks

— "Prevention measures that do NOT work" is a good section

— (cookie1=expires in 6h)(cookie2=expires in a week)(cookie3=exipires in a month)... so if img got these, attacker get 3 cookies and tries to access site next day, session doesnt work, see

Message permanent page

— Attacker does not get the cookie

— There is no "next day"

— Your browser runs the code to load an image and then makes a request to your app server, browser auto-sends a cookie to your app server, and suddenly now your app server is doing whatever is described in the img tag's query string

Message permanent page


<img src="" width="0" height="0" border="0">

example from that page

Message permanent page

— That is the whole attack right there, nothing more

— There are a lot more ways to do CSRF but that's the easiest