Describe the problem scenario: for example, submitting forms such as forum posts and registration. some malware may simulate the post form data process. how can this prevent automatic submission? It is recommended that you do not describe the verification code in the following scenarios:
For example, submitting forms such as posting and registration in a forum. some malware may simulate the post form data process. how can this prevent automatic submission?
Supplement: it is best not to mention the verification code.
Reply content:
Describe the problem scenario:
For example, submitting forms such as posting and registration in a forum. some malware may simulate the post form data process. how can this prevent automatic submission?
Supplement: it is best not to mention the verification code.
Define a random number session variable in the background;
Output this value in input in form.
After submission, it is determined that the session is not the same as the input value. if the input value is equal, the session value is changed.
This will effectively prevent repeated submissions. if you want to experience better interaction between the front end and JavaScript optimization, you can check how CSRF is implemented.
1. use CSRF,
2. use the verification code