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

Issue with multiple tabs with POST ajax requests #116

Open
srishti-chouksey opened this issue May 28, 2019 · 7 comments
Open

Issue with multiple tabs with POST ajax requests #116

srishti-chouksey opened this issue May 28, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@srishti-chouksey
Copy link

srishti-chouksey commented May 28, 2019

Whenever there are multiple tabs open and there are POST requests being executed on both, one of the page faces CSRF validation due to deletion of token assuming that the old tokens are consumed.
Consider the below scenario in order given,

Tab 1 : I have a page A which loads
and there is a post ajax call on load to load certain section on the page A.

Tab 2 : I open another page B and navigate to a page C which has a form to post.

Tab 1 : I fill up a form on the page A, that causes a re-trigger of the ajax call on the page A to reload a section.

Tab 2 : I submit a form on Page C.

My submit request is blocked by the csrf protector giving 403.

My application has ajax post calls and form posts which get executed on multiple tabs.
In such a case the old csrf token gets deleted causing error for genuine requests by the user.

How do I solve this issue?

@srishti-chouksey srishti-chouksey changed the title Issue with multiple tabs with POST Issue with multiple tabs with POST ajax requests May 28, 2019
@srishti-chouksey
Copy link
Author

@mebjas, can you please have a look, thanks.

@mebjas mebjas self-assigned this May 29, 2019
@bhavinrshah
Copy link

@mebjas : Do we have any update on this?

@srishti-chouksey
Copy link
Author

@mebjas, did you get a chance to take a look at this?

@mebjas
Copy link
Owner

mebjas commented Jul 21, 2019

I have setup a branch to reproduce this issue. If you have a setup online that can reproduce this issue, please point me to that. @srishti-chouksey @bhavinrshah

@bhavinrshah
Copy link

We don't have setup online. Have you checked the issue?

@mebjas mebjas added the next ver label Feb 8, 2020
@mebjas mebjas added this to the Version 1.1.0 milestone Feb 8, 2020
@mebjas
Copy link
Owner

mebjas commented May 23, 2020

I have not been able to reproduce this yet. Is this still a problem?

@CassadyCampos
Copy link

What happened to this?

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

No branches or pull requests

4 participants