Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x 2c570edf0 -> 6cd10f970


WICKET-6245 Open up CsrfPreventionRequestCycleListener for extension

Wrap a debug logiing in LOG.isDebugEnabled()


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/6cd10f97
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/6cd10f97
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/6cd10f97

Branch: refs/heads/wicket-7.x
Commit: 6cd10f970d49ee1cd275c5038aa3c58c9738efaf
Parents: 2c570ed
Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
Authored: Tue Sep 20 22:07:37 2016 +0200
Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
Committed: Tue Sep 20 22:08:42 2016 +0200

----------------------------------------------------------------------
 .../protocol/http/CsrfPreventionRequestCycleListener.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/6cd10f97/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
index 4025e7e..72fa4ee 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.java
@@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletRequest;
 import org.apache.wicket.RestartResponseException;
 import org.apache.wicket.core.request.handler.IPageRequestHandler;
 import org.apache.wicket.core.request.handler.RenderPageRequestHandler;
-import org.apache.wicket.protocol.http.WebApplication;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.wicket.request.IRequestHandlerDelegate;
 import org.apache.wicket.request.component.IRequestablePage;
@@ -358,8 +357,11 @@ public class CsrfPreventionRequestCycleListener extends 
AbstractRequestCycleList
                        }
                        else
                        {
-                               log.debug("Targeted page {} was opted out of 
the CSRF origin checks, allowed",
-                                       targetedPage.getClass().getName());
+                               if (log.isDebugEnabled())
+                               {
+                                       log.debug("Targeted page {} was opted 
out of the CSRF origin checks, allowed",
+                                                       
targetedPage.getClass().getName());
+                               }
                                allowHandler(containerRequest, sourceUri, 
targetedPage);
                        }
                }

Reply via email to