Welcome Guest, Not a member yet? Register   Sign In
Invalid CSRF token when submitting a form
#8

When

PHP Code:
$config['csrf_regenerate'] = TRUE

It would be normal for the value of MLLCookieName to change after each POST request.
I'd say leave that config set to FALSE until it can be determined why things don't work.

The fact that you're still getting the error even after adding the URL to 'csrf_exclude_uris' is really suspicious.
According to the html you show that config should look like this

PHP Code:
$config['csrf_exclude_uris'] = array('stock/search'); 

If that's the setting (and that is the controller/method that actually handles the form)  then CSRF checking should be completely bypassed.
That makes me wonder if the "search" method is doing some kind of check on its own (it shouldn't be) or if there
is a "hook" that is messing about with the CSRF.

To the best of my knowledge there isn't any error message with the exact text "Invalid CSRF token" in the CI core. So that kind of points to some custom code.

Or, maybe an old version? What version are you working with?
Reply


Messages In This Thread
RE: Invalid CSRF token when submitting a form - by dave friend - 01-24-2018, 06:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB