Stars: 209
Forks: 90
Pull Requests: 53
Issues: 107
Watchers: 17
Last Updated: 2022-05-25 09:50:50
CSRF Protector library: standalone library for CSRF mitigation
License: Other
Languages: PHP, JavaScript
CSRF protector php, a standalone php library for csrf mitigation in web applications. Easy to integrate in any php web app.
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 alternatively
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!
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/csrf/config.php
Edit config accordingly. See Detailed Information link below.
Link to wiki - Editing Configurations & Mandatory requirements before using this library
<?php
include_once __DIR__ .'/vendor/owasp/csrf-protector-php/libs/csrf/csrfprotector.php';
// Initialise CSRFProtector library
csrfProtector::init();
simply include the library and call the init()
function!
Join Discussions at Google Group \ OWASP \ CSRF Protector
For any other queries contact me at: [email protected] | [email protected]
Well, there are various ways to contribute to this project. Find a few of them listed below:
enhancement
exists in the mentioned link.Up For Grab
label.master branch
.