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

Tokens not injected in dynamic content returned from Ajax #151

Closed
bwolin opened this issue Oct 16, 2020 · 2 comments
Closed

Tokens not injected in dynamic content returned from Ajax #151

bwolin opened this issue Oct 16, 2020 · 2 comments

Comments

@bwolin
Copy link

bwolin commented Oct 16, 2020

My application posts a form using Ajax successfully. The response, however, contains links that are appended to the DOM. Those links are never processed and they are therefore all failing.

I have validated that the injectAttributes variable is set to true.

`

	var injectForms = true;

	var injectGetForms = true;

	var injectFormAttributes = true;

	var injectAttributes = true;`

Sorry if I am missing something obvious here, but is this a supported feature? I can't find any documentation indicating how to manually post-process content we get using ajax.

Thanks in advance for any clues as to how to get this use case to work.

@forgedhallpass
Copy link
Collaborator

This is not currently possible with the 3.1.0 release, but I've implemented it in #148.
The #136 pull request contains a lot of changes I've made with the intention of creating 4.0 version of the CSRFGuard. It is currently in a release candidate stage that I am testing in couple of projects. Feel free to give it a try and provide your feedback.

@forgedhallpass
Copy link
Collaborator

The changes covering this scenario has been merged into the official master repository. You can find the new version under releases

Your feedback is welcome.

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

No branches or pull requests

2 participants