Skip to content

CSRF Token mismatch #7

@Linkto91

Description

@Linkto91

Hi,

Firstly, thanks for your work !

I installed your plugin, I am working with CakePHP 3.7.

The problem is that I can't acceed to my page to add an user for example.
The error message is :

CSRF token mismatch. Cake\Http\Exception\InvalidCsrfTokenException
Documentation API

If you want to customize this error message, create src/Template/Error/error400.ctp
toggle vendor stack frames

    ⟩ Cake\Http\Middleware\CsrfProtectionMiddleware->_validateToken CORE/src/Http/Middleware/CsrfProtectionMiddleware.php, line 120

I understand that the problem is about the CSRF, I tried to resolved with a lot of solution but nothing to do, I don't understand why.

I tried to change the route, to remove :
// $routes->applyMiddleware('csrf');

All solutions to disable the CSRF on this page what I found on internet (Google) don't work.

When I access to the page for the view without send POST, the page works.

Thank you by advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions