Simple CSRF

0

>> Buy Now at discounted price while it’s still available <<

Simple CSRF

Simple CSRF plugin that instantly includes in each type on a web page input with csrf token.

What is CSRF?

https://en.wikipedia.org/wiki/Cross-site_request_forgery

Why I require defense?

CSRF is a sort of assault when cyberpunks send out evil demands to your site (to put it simply: do negative points).
To protect against these assaults you require to “sign” each demand with token, that will certainly be looked at the site’s web server.

Ok, I obtained it. What to do following?

First of all you require to prepare your site web server to create and also examine token. When it will certainly be done you can include CSRF defense to web page, utilizing this plugin.

Done. How to include the plugin to my site?

See Instructions block

Documentation

Documentation is offered with download documents

I have inquiries

Feel totally free to call me: [email protected] (Simple CSRF in the e-mail topic)

Free assistance
Future item updates
Quality inspected by Codester
Lowest rate warranty

  • Lightweight (~2.5 KB)
  • 5 minutes to set up
  • No jQuery reliant
  • Supports all most recent variations of internet browser consisting of IE11 and also over


Setup backend web server to supply CSRF token

To set up and also utilize SimpleCSRF you require to include simple-csrf.js to your html web page:

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Your amazing job</title>
    <!-- Your generated token below: -->
    <meta name="_csrf" content="715cadfc84f3592683c75b74c7ba6950" />
    <script src="https://path/to/scrpits/simple-csrf.js"></script>
</head>
<body>
    <form id="form_to_protect" method="POST" action="/send_request">
        <input name="first_name" value="John" placeholder="Enter first name" />
        <input name="last_name" value="Doe" placeholder="Enter last name" />
        <button type="Submit">Submit</button>
    </form>
</body>

Then, you need configure plugin:

const csrf = new SimpleCSRF({
  fromMeta: '_csrd',
  name: '_csrf-token'
});

// To add CSRF protection to a form, you need to specify which form you want to protect
// with DOM element
csrf.addToForm(document.forms.form_to_protect);
// or with form id
csrf.addToForm('form_to_protect');
// or if you want to add CSRF protection to all forms on the page, you can use:
csrf.addToAllForms();

That’s it! After opening this page your form will look like this:

<form id="form_to_protect" method="POST" action="/send_request">
    <input name="first_name" value="John" placeholder="Enter first name" />
    <input name="last_name" value="Doe" placeholder="Enter last name" />
    <button type="Submit">Submit</button>
    <input id="form_to_protect__csrf" name="_csrf-token" value="715cadfc84f3592683c75b74c7ba6950" />
</form>

And token will be sent with form data when user clicks submit. Profit 🙂

READ :   Fully Responsive - Single Song Audio Player

Then, you need configure plugin:

>>Click here to get Simple CSRF at discounted price while it’s still available…<<

4415 5229974415

Leave A Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.