2017 © Pedro Peláez
 

package csrf

CSRF protection - PHP security classes to avoid vulnerabilities

image

hadi/csrf

CSRF protection - PHP security classes to avoid vulnerabilities

  • Wednesday, January 17, 2018
  • by im4aLL
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

CSRF token validator

CSRF protection - PHP security classes to avoid vulnerabilities, (*1)

Installation

composer require hadi/csrf

Usage

Add CSRF token to form, (*2)




Then check CSRF token in your form submission area -, (*3)

session_start();
require_once __DIR__ . '/PATH_TO_YOUR_AUTOLOAD/vendor/autoload.php';

$csrf = new \Hadi\Csrf();

if(isset($_POST['submit'])) {
    if($csrf->validRequest()) {
        // Valid request
    }
    else {
        // invalid request
    }
}

$csrf->reset(); // or $csrf->deleteToken();

Have fun!, (*4)

The Versions

17/01 2018

dev-master

9999999-dev

CSRF protection - PHP security classes to avoid vulnerabilities

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Habib Hadi

17/01 2018

1.0.0

1.0.0.0

CSRF protection - PHP security classes to avoid vulnerabilities

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Habib Hadi