-
Notifications
You must be signed in to change notification settings - Fork 121
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
Invalidate CSRF token #68
Comments
That sounds a bit like you're trying to do more than mitigate a CSRF attack with it. What are you trying to do? |
With the default token implementation, there is no way to first-class mechanism to invalidate the token. Invalidated only at the terminus of the session is sufficient as far as OWASP is concerned. You could certainly provide your own token implementation (using the |
@aredridel I will try to explain my requirement with small example. I have two pages 1. user edit page, 2. offers edit page. I should allow to use the token which is generated for user edit page in offer edit page. @jasisk Thanks for your quick response. I have go through the default token.js and wrote the customized token file. I placed it in the /lib/csrfToken.js. Now I am struggling to configure my implementation function. Can you please help me? I want to supply implementation function in the argument.
Thanks in advance |
Hi @jasisk I Have specified my application configuration below.
And I have changed Line 26th of https://github.com/krakenjs/lusca/blob/master/lib/csrf.js as follows. impl = require(options.impl) || token; Is there any way to call my function without modifying lusca code. Thanks. |
So why does this require invalidating the token, if both pages should use the same one? |
Really sorry. It's a typo. I should not allow. Thanks. |
Ah, okay. That makes more sense. It doesn't really answer why though -- what are you trying to prevent? Sounds like more than CSRF attacks that you're trying to prevent. |
Hi
I am using krakenJS and enabled CSRF. Currently I am able to reuse the generated csrf token in one page to another page(With in the user session only)
I don't want to reuse the token even within the user session. Can I invalidate the token somehow?
Is there anyway to do it lusca?
Thanks in advance
K.Mugunthan.
The text was updated successfully, but these errors were encountered: