Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF token is missing #14

Open
htuscher opened this issue Jan 10, 2019 · 1 comment · May be fixed by #25
Open

CSRF token is missing #14

htuscher opened this issue Jan 10, 2019 · 1 comment · May be fixed by #25

Comments

@htuscher
Copy link

If you have a fusion based form on your page, only the trustedProperties are rendered as hidden fields.
That's usually not a problem, as long as your frontend user is not logged in.

Cause:
CSRF check is disabled if no user is authenticated. But if it is, it expects a valid CSRF token for every non-safe request.
The fusion form renderer is currently missing the hidden field __csrfToken.

@bwaidelich
Copy link
Member

Thanks for reporting.
I currently have no requirement for this, but you are totally right of course and if you want you can push a PR with sth like

    formCsrfTokenField = Neos.Form.FusionRenderer:CsrfHiddenField

after https://github.com/neos/form-fusionrenderer/blob/master/Resources/Private/Fusion/Core/Form.fusion#L13

(probably it needs a custom eel helper - or just extend the provided FormHelper)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants