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

Avoid popping from empty list #27

Merged

Conversation

ricardogsilva
Copy link
Contributor

@ricardogsilva ricardogsilva commented Sep 1, 2023

This PR implements the solution proposed by @scott2b in the description of #21:

#21 (comment)

I was getting hit with NS_ERROR_NET_PARTIAL_TRANSFER when trying to implement CSRF protection on my fastapi-users based application and it turns out that applying the fix suggested in the mentioned comment fixed it for me. The server logs were showing that the error was the same as mentioned in #21

Submitting this as a PR to see if it can gain enough traction to be merged and eventually warranting a new release of asgi-csrf.

fixes #21

@simonw
Copy link
Owner

simonw commented Aug 15, 2024

I'd love to figure out a test that demonstrates this fix. Any idea of steps to reproduce?

@simonw
Copy link
Owner

simonw commented Aug 15, 2024

This looks harmless enough that I'll merge it without tests.

@simonw simonw merged commit dd7496b into simonw:main Aug 15, 2024
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

Successfully merging this pull request may close these issues.

IndexError thrown on form posts
2 participants