How to secure Ajax link requests?

前端 未结 8 999
刺人心
刺人心 2020-12-08 04:04

Imagine the next scenario: a user wants to register to a webpage and fills a form. While he is filling the form, jQuery keeps checking through a regular expression if fields

8条回答
  •  自闭症患者
    2020-12-08 04:33

    You could use a CSRF token and exit early from your script if you detect that no or an invalid CSRF token. Almost (if not all) PHP frameworks come with support for this.

    Also check this question from the security community: https://security.stackexchange.com/questions/23371/csrf-protection-with-custom-headers-and-without-validating-token

提交回复
热议问题