From 71647a6587d4a1b365e382590e535a3915255cac Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 5 Sep 2014 15:32:04 -0400 Subject: Specify response header X-Frame-Options SAMEORIGIN for generated pages --- src/main/java/com/gitblit/wicket/pages/BasePage.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/gitblit/wicket/pages/BasePage.java b/src/main/java/com/gitblit/wicket/pages/BasePage.java index 49710397..b454b7a8 100644 --- a/src/main/java/com/gitblit/wicket/pages/BasePage.java +++ b/src/main/java/com/gitblit/wicket/pages/BasePage.java @@ -166,6 +166,9 @@ public abstract class BasePage extends SessionPage { // use default Wicket caching behavior super.setHeaders(response); } + + // XRF vulnerability. issue-500 / ticket-166 + response.setHeader("X-Frame-Options", "SAMEORIGIN"); } /** -- cgit v1.2.3