pyrocms/pyrocms — Issue #1035: Ajax forms are broken when csrf is enabled (in the backend at least)
Author: pakacuda
Created: 2011-12-23 14:52:28+00:00
State: open

The server returns a 500 status error in the response header when the csrf_protection is set to true in cms/config/config.php
This is due to the fact that value of the csrf cookie is not synced with the value that is generated by code igniter every time a request is processed. When using ajax and csrf is on, the response should contain the new value of the csrf_cookie_name cookie.
There's a method in the CI's Security class that can be used to retrieve the new value.