Skip to content

Instantly share code, notes, and snippets.

View rahulchhangani's full-sized avatar
💭
Founder Fistreet India

Rahul Chhangani rahulchhangani

💭
Founder Fistreet India
View GitHub Profile
@rahulchhangani
rahulchhangani / MY_Security.php
Created October 2, 2016 16:46 — forked from CMCDragonkai/MY_Security.php
PHP: Codeigniter CSRF functionality does not support putting the CSRF token in the HTTP headers for the purposes of the double submit cookie method. It also only runs the CSRF check on POST and not on PUT or DELETE. This drop in MY_Security.php makes sure CSRF runs on POST, PUT or DELETE and checks the HTTP headers for X-XSRF-TOKEN recommended b…
<?php
class MY_Security extends CI_Security{
//overriding the normal csrf_verify, this gets automatically called in the Input library's constructor
//verifying on POST and PUT and DELETE
public function csrf_verify(){
$request_method = strtoupper($_SERVER['REQUEST_METHOD']);
@rahulchhangani
rahulchhangani / eclipse-install.md
Created September 7, 2016 02:01 — forked from tuxdna/eclipse-install.md
Install Eclipse on Fedora 23
sudo dnf install -y eclipse-{platform,pydev,cdt-sdk,egit,webtools-javaee}
sudo dnf install -y eclipse-dltk-{ruby,mylyn,rse,tests,sdk,tcl,itcl,xotcl}
sudo dnf install -y eclipse-color-theme