Lessons

CSRF protection of HTML forms

CSRF is a technology to prevent unauthorized submission of a form. Its essence is that a unique ID is generated for each form and user and is contained in the HTML code of the page. This ID is known only by the one who opened the HTML, therefore, it is inaccessible to the attacker. When submitting the form, this ID is verified on the server side. Thus, the attacker cannot send a request to the site on behalf of the user.

Example of CSRF protection operation:

<form action="." method="post">
    /* The _csrf field contains a special verification code that is unique for each page */
    <input type="hidden" name="_csrf" value="4B01Wfyq7mFSfPR-tSzZFTUJdocsowAfyFUSPYJ_EZiKLlIAqfCYE2AYkh3PfIFze19E4RSVSymPEiRT0A1ryA==">
    <input type="text" name="login">
    <input type="password" name="login">
    <input type="submit">
</form>

The CSRF attack is extremely popular. Implement CSRF protection on your project.

Detailed simple описание. Detailed technical description.

Tariff plans for working with the service

Additional pages

For an active subscription
spend during the year
Any website
*0.3 - 3₽ / 1 page

Additional pages for the Subscription plan.

Adding funds via your merchant profile.

*The price depends on the active subscription. The more expensive the tariff, the cheaper the additional pages.

We use cookies. By continuing to use the site, you agree to the processing of personal data in accordance with privacy policy. I agree