From 7fdc298cf06c3d88d4fd9fd158fb4d32edac12a0 Mon Sep 17 00:00:00 2001 From: James Moger Date: Sun, 7 Sep 2014 11:52:53 -0400 Subject: [PATCH] Apply the relaxed XSS filter to Markdown commit messages --- src/main/java/com/gitblit/wicket/pages/RepositoryPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java index 253c4fe4..2bd9dc6c 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java @@ -550,7 +550,8 @@ public abstract class RepositoryPage extends RootPage { String html; switch (model.commitMessageRenderer) { case MARKDOWN: - html = MessageFormat.format("
{0}
", content); + String safeContent = app().xssFilter().relaxed(content); + html = MessageFormat.format("
{0}
", safeContent); break; default: html = MessageFormat.format("
{0}
", content); -- 2.39.5