Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CsrfTokenManager's checkToken - a small change? #51

Open
nabeygun opened this issue Dec 13, 2024 · 0 comments
Open

CsrfTokenManager's checkToken - a small change? #51

nabeygun opened this issue Dec 13, 2024 · 0 comments

Comments

@nabeygun
Copy link

My application has some advice when there is no session to try and authenticate the user first before trying the link again via an internal redirect (response.sendRedirect). However, the problem when this redirect happens is the flag on the session.isNew() is no longer true so it fails on the method checkToken https://github.com/porscheinformatik/tapestry-csrf-protection/blob/master/src/main/java/at/porscheinformatik/tapestry/csrfprotection/internal/CsrfTokenManager.java#L82
Would it be possible to add to this check when the serverToken is null so it returns similar to when session.isNew() is checked? Do you see any problems with returning when the serverToken is null? I tried to override this CsrfTokenManager class on my side but Tapestry cannot seem to override it (as it isn't an interface?)

Thanks

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

No branches or pull requests

1 participant