CodeIgniter 2.0 + AJAX Requests

Just discovered an issue while trying to post data to a controller via Ajax. If you have CSRF protection enabled in your config.php, the Security class will check for the CSRF token to verify credentials.

A quick and easy solution is to turn off CSRF protection in your config.php by checking the REQUEST_URI like so:

if(stripos($_SERVER[“REQUEST_URI”],’/controller’) === FALSE){
    $config[‘csrf_protection’] = TRUE;
else {
    $config[‘csrf_protection’] = FALSE;
}

thetieguy:

New J.crew shawl cardigan.

thetieguy:

New J.crew shawl cardigan.

(via theclassyissue)

(Source: airows)

(Source: theclassyissue)

life:

In 1960, LIFE magazine assigned Eve Arnold, who died in January 2012 at the age of 99, to document the days and nights of Malcolm X, the controversial and intensely charismatic public face of the Nation of Islam.
On the anniversary of his death, we revisit her set of photos that surprisingly enough never made it into the magazine. (well, ours at least)
(Eve Arnold—Magnum)

life:

In 1960, LIFE magazine assigned Eve Arnold, who died in January 2012 at the age of 99, to document the days and nights of Malcolm X, the controversial and intensely charismatic public face of the Nation of Islam.

On the anniversary of his death, we revisit her set of photos that surprisingly enough never made it into the magazine. (well, ours at least)

(Eve Arnold—Magnum)

Flagging a message for later reading creates the same fake sense of accomplishment as putting an item on a to-do list - you give yourself permission to never think about it again.

http://www.randsinrepose.com/archives/2012/10/14/the_elegant_email.html

(Source: airows)

Talent

Talent

(Source: airows)

(via dropanchors)

Blogs I follow:

Photos: