Welcome Guest, Not a member yet? Register   Sign In
How to disable CSRF temporaly for callback controllers ?
#8

[eluser]oskarols[/eluser]
[quote author="InsiteFX" date="1299755786"]You could try this also: I tested it and it does change the variable in the Input Class.
Code:
$this->input->_enable_csrf = FALSE;
$this->input->_enable_csrf = TRUE;

If this will not work then the input Class would need to be extended!

InsiteFX[/quote]

That won't work either, since the CSRF-check is executed in the constructor of the Input class.

I went with doing a pre-system hook to solve this:

Code:
function disable_if_callback()
{    
    if(stripos($_SERVER["REQUEST_URI"],'/mypage') !== FALSE)
    {
        $CFG =& load_class('Config', 'core');
        $CFG->set_item('csrf_protection', FALSE);
    }
}


Messages In This Thread
How to disable CSRF temporaly for callback controllers ? - by El Forum - 03-17-2011, 06:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB