How is using Synchronizer Token Pattern to prevent CSRF safe?

前端 未结 2 1548
长发绾君心
长发绾君心 2021-02-05 02:49

I have been reading about using a synchronizer token pattern to prevent CSRF (CSRF meaning Cross-site request forgery.), and I don\'t understand how it actually safe.

Le

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 03:39

    And that is exactly the point. The Same Origin Policy in the browser does not allow GET requests to other sites. So no site can GET the CSRF token from another just using Javascipt within the browser.

提交回复
热议问题