Giter Site home page Giter Site logo

esarafianou / csrf-protector-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mebjas/csrf-protector-php

0.0 2.0 0.0 225 KB

CSRF Protector library: standalone library for CSRF mitigation

License: Other

JavaScript 23.83% PHP 76.14% ApacheConf 0.03%

csrf-protector-php's Introduction

CSRF Protector

Todo Status Build Status Coverage Status
CSRF protector php, a standalone php library for csrf mitigation in web applications. Easy to integrate in any php web app.

Add to your project using packagist

Add a composer.json file to your project directory

{
   "require": {
       "owasp/csrf-protector-php": "dev-master"
   }
}

Then open terminal (or command prompt), move to project directory and run

composer install

OR

php composer.phar install

This will add CSRFP (library will be downloaded at ./vendor/owasp/csrf-protector-php) to your project directory. View packagist.org for more help with composer!

Configuration

For composer installations: Copy the config.sample.php file into your root folder at config/csrf_config.php For non-composer installations: Copy the libs/csrf/config.sample.php file into libs/csrc/config.php Edit config accordingly. See Detailed Information link below.

How to use

<?php
include_once __DIR__ .'/vendor/owasp/csrf-protector-php/libs/csrf/csrfprotector.php';

//Initialise CSRFGuard library
csrfProtector::init();

simply include the library and call the init() function!

###Detailed information @Project wiki on github ###More information @OWASP wiki

###Contribute

  • Fork the repo
  • Create your branch
  • Commit your changes
  • Create a pull request

###Note This version (master) requires the clients to have Javascript enabled. However if your application can work without javascript & you require a nojs version of this library, check our nojs version

##Join Discussions on mailing list link to mailing list

for any other queries contact me at: [email protected]

csrf-protector-php's People

Contributors

abhinavdahiya avatar mebjas avatar msalestream avatar sautdechat avatar stephenlawrence avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.