Jump to content

CSRF only working on internal pages


blacksrv
 Share

Recommended Posts

I'm having a strange problem with CSRF, hasValidToken() only works on internal pages and not on the homepage.

The weird thing: is the same form, I have a modal in the footer, so every single page uses the same form. If I register using an internal page it works fine, if I use the homepage to register, the csrf token returns error.

This is what I use to validate:

if ( ! $this->session->CSRF->hasValidToken() ) {
$errors['csrf'] = __( "Form submit was not valid, please try again." );
}

Any ideas?

Link to comment
Share on other sites

Hi blacksrv,

Sorry you got no answers to your question. Perhaps some people (including myself) have trouble understanding your problem. Could you describe it more verbose? For example: what are internal pages? What kind of error do you get? What are you trying to achieve?

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...