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

Parse method always returns an object #32

Closed
CarlinCanales opened this issue Oct 28, 2021 · 1 comment
Closed

Parse method always returns an object #32

CarlinCanales opened this issue Oct 28, 2021 · 1 comment

Comments

@CarlinCanales
Copy link

https://github.com/j0lv3r4/next-csrf/blob/6f6de6b8269d1af785509680b73f53305f6ffe03/src/middleware/csrf.ts#L46

In the above line, the parse method always returns an object, but you are immediately checking for .length which suggests you're expecting an array. So the .length always fails and I keep getting a 403 Invalid CSRF Token message. Is this a bug?

@juanbzpy
Copy link
Owner

juanbzpy commented Nov 5, 2021

Fixed with #31

@juanbzpy juanbzpy closed this as completed Nov 5, 2021
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