2017 © Pedro Peláez
 

library phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

image

joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  • Sunday, December 27, 2015
  • by jfallon
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

phpcsrf

By Joe Fallon, (*1)

A simple library for cross-site request forgery (CSRF) prevention in PHP. It has the following features:, (*2)

  • Full suite of unit tests.
  • It can be integrated into any existing project.
  • Can be fully understood in just a few moments.
  • Uses a cryptographically secure randomly generated token.

Installation

The easiest way to install PhpCsrf is with Composer. Create the following composer.json file and run the php composer.phar install command to install it., (*3)

{
    "require": {
        "joefallon/phpcsrf": "*"
    }
}

Usage

Create a Form Token

Create the form token., (*4)

$session = new Session();
$csrf = new CsrfGuard('form-name', $session);
$csrf->generateToken();

Then, store the form token in the form., (*5)

<input type="hidden" name="csrf" value="55517f7944ee117160414b601a15e60e1076f5b4">

Validate a Form Token

$session = new Session();
$csrf = new CsrfGuard('form-name', $session);
$csrf->isValidToken('55517f7944ee117160414b601a15e60e1076f5b4');

The Versions

27/12 2015

dev-master

9999999-dev https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

27/12 2015

dev-develop

dev-develop https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

27/12 2015

v1.0.6

1.0.6.0 https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

26/09 2015

v1.0.5

1.0.5.0 https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

05/02 2015

v1.0.4

1.0.4.0 https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

28/01 2015

v1.0.3

1.0.3.0 https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

22/01 2015

v1.0.2

1.0.2.0 https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

13/01 2015

v1.0.1

1.0.1.0 https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication

13/01 2015

v1.0.0

1.0.0.0 https://github.com/joefallon/phpcsrf

PhpCsrf is a simple library for cross-site request forgery prevention.

  Sources   Download

MIT

The Requires

 

The Development Requires

authentication