Anti-Malware auto-Submit Form

Source: Internet
Author: User
Describe the problem scenario:

such as forum postings, registration, such as the submission of the form. There may be some malware that simulates the process of post form data, how can it prevent automatic submission?

Add: It's better not to say that the CAPTCHA

Reply content:

Describe the problem scenario:

such as forum postings, registration, such as the submission of the form. There may be some malware that simulates the process of post form data, how can it prevent automatic submission?

Add: It's better not to say that the CAPTCHA

  1. A session variable that defines a random number in the background;

  2. Output this value in input in the form form.

  3. After submission, the session is judged to be unequal to this input value, and the session value is changed by the equivalent.

This will effectively prevent duplicate submissions, want to experience a better front end and then use JavaScript to optimize the interaction, you can check how CSRF is implemented.

1. Using CSRF,
2. Using the Verification code

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.