From: James Moger Date: Tue, 4 Nov 2014 22:12:00 +0000 (-0500) Subject: Whitelist the "target" link attribute in the XSS filter X-Git-Tag: v1.7.0~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b76107bb240c54ba4d4c8e1d2badd412e5c473fa;p=gitblit.git Whitelist the "target" link attribute in the XSS filter --- diff --git a/src/main/java/com/gitblit/utils/JSoupXssFilter.java b/src/main/java/com/gitblit/utils/JSoupXssFilter.java index 7fa7b2a1..5ab7953a 100644 --- a/src/main/java/com/gitblit/utils/JSoupXssFilter.java +++ b/src/main/java/com/gitblit/utils/JSoupXssFilter.java @@ -68,7 +68,7 @@ public class JSoupXssFilter implements XssFilter { "sub", "sup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "tt", "u", "ul", "var") - .addAttributes("a", "class", "href", "style", "title") + .addAttributes("a", "class", "href", "style", "target", "title") .addAttributes("blockquote", "cite") .addAttributes("col", "span", "width") .addAttributes("colgroup", "span", "width")