Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 1.12 KB

File metadata and controls

18 lines (14 loc) · 1.12 KB

CSRF Protection For PHP WebApps

This repository demonstrates how to protect your PHP web applications from Cross-site Request Forgery.

Install xampp or wamp to your computer. In xampp paste DoubleSubmitPatternCookies and SynchronizerTokenPattern folders inside xampp\htdocs folder. In wamp paste DoubleSubmitPatternCookies and SynchronizerTokenPattern folders inside wamp\www folder.

Double Submit Pattern Cookies

This example explains the way to use the Double Submit Pattern Cookies to secure your PHP web application from CSRF. To access the Double Submit Pattern Cookies example access the url:http://localhost:{port}/DoubleSubmitPatternCookies.

Synchronizer Token Pattern

This example explains the way to use the Synchronizer Token Pattern to secure your PHP web application from CSRF. To access the Synchronizer Token Pattern example access the url:http://localhost:{port}/SynchronizerTokenPattern.

You can follow my blog post if you want to develop these solutions from the scratch. https://jccreations-acc.blogspot.com/2018/10/how-to-protect-your-web-application.html port="Whatever the port your apache server is running."