forked from OWASP/www-project-csrfguard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed NewTokenLandingPage functionality OWASP#55
* If the user has no session (e.g. missing JSESSIONID cookie) and the "org.owasp.csrfguard.UseNewTokenLandingPage" property is configured to true, the user will be redirected to the new token landing page (defined by the "org.owasp.csrfguard.NewTokenLandingPage" property). If the "NewTokenLandingPage" is protected, a new CSRF token is sent along in the auto-submit form. The request body and query parameters are discarded. * Removed null check for the "getNewTokenLandingPage()" method in the "CsrfGuard.java#writeLandingPage" method, because the method is only being invoked if "org.owasp.csrfguard.UseNewTokenLandingPage" is true, which can only happen if the "org.owasp.csrfguard.NewTokenLandingPage" property is not null. This is a very rare/special use-case that can only happen if an application without authentication is protected against CSRF attacks (probably anti-automation), or if for some reason the CSRF filter is before the integrator application's authentication filter (which is not recommended!), otherwise the authentication filter should redirect to the login page.
- Loading branch information
1 parent
a1cf527
commit 74008a2
Showing
4 changed files
with
15 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters