{"id":126,"date":"2011-01-06T23:59:42","date_gmt":"2011-01-07T07:59:42","guid":{"rendered":"http:\/\/www.mantisbt.org\/blog\/?p=126"},"modified":"2015-01-16T09:46:40","modified_gmt":"2015-01-16T14:46:40","slug":"x-content-security-policy-now-fully-implemented-in-mantisbt-1-3-x","status":"publish","type":"post","link":"https:\/\/mantisbt.org\/blog\/archives\/mantisbt\/126","title":{"rendered":"X-Content-Security-Policy now fully implemented in MantisBT 1.3.x"},"content":{"rendered":"<p>In November of 2010 I provided a <a title=\"Progress towards fully implementing X-Content-Security-Policy\" href=\"http:\/\/www.mantisbt.org\/blog\/?p=119\">progress update<\/a> on work performed to ensure MantisBT 1.3.x fully supports the <a title=\"Content-Security-Policy specification\" href=\"https:\/\/wiki.mozilla.org\/Security\/CSP\/Specification\">X-Content-Security-Policy feature of Firefox 4<\/a>. At the time, MantisBT was only providing <a title=\"MantisBT Bug #11825: Support X-Content-Security-Policy (CSP)\" href=\"http:\/\/www.mantisbt.org\/bugs\/view.php?id=11825\">partial support of X-Content-Security-Policy<\/a> due to a large amount of inline JavaScript contained within pages MantisBT was returning to clients. I am pleased to report that as of late December 2010, <a title=\"MantisBT Bug #11826: Remove all inline JavaScript from MantisBT (use external scripts instead)\" href=\"http:\/\/www.mantisbt.org\/bugs\/view.php?id=11826\">MantisBT no longer produces inline JavaScript in page outputs<\/a>. <!--more-->This means that the following HTML output is no longer permitted in any part of MantisBT&#8217;s XHTML page output: onchange=&#8221;&#8230;&#8221; attributes, &lt;script&#8230;&gt;some_code();&lt;\/script&gt; and &lt;a href=&#8221;javascript:some_code()&#8221;&#8230;<\/p>\n<p>Browsers supporting X-Content-Security-Policy will not be at risk of having malicious JavaScript code execute as a result of <a title=\"Wikipedia: Cross Site Scripting (XSS)\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cross-site_scripting\">Cross Site Scripting (XSS)<\/a> vulnerabilities discovered in MantisBT core or any MantisBT plugins. Attackers looking to exploit XSS vulnerabilities are therefore severely restricted in what they can accomplish. For the most part, a XSS vulnerability in MantisBT will only lead to partial <a title=\"Wikipedia: Website defacement\" href=\"http:\/\/en.wikipedia.org\/wiki\/Website_defacement\">page defacements<\/a> &#8211; an annoyance rather than a major security concern. The remaining risk is that attackers could trick a user into clicking on an innocent looking hyperlink to launch an external web site that aims to attack their browser. To counter this risk it is recommended that you use <a title=\"NoScript project home page\" href=\"http:\/\/noscript.net\/\">NoScript<\/a> (or similar) to control which domains have the ability to execute JavaScript within your browser. Because <a title=\"MantisBT 1.2.x commits related to improvements to Cross Site Request Forgery (CSRF) protection\" href=\"http:\/\/git.mantisbt.org\/?p=mantisbt.git&amp;a=search&amp;h=refs%2Fheads%2Fmaster-1.2.x&amp;st=commit&amp;s=CSRF\">MantisBT 1.2.0 (since July 2009) and all later versions fully implement<\/a> <a title=\"Wikipedia: Cross Site Request Forgery (CSRF\/XSRF)\" href=\"Cross-site request forgery\">Cross Site Request Forgery (CSRF)<\/a> the malicious hyperlinks placed in a hypothetical XSS attack on MantisBT can not be used to maliciously perform actions on behalf of the user (even if the user has clicked on a maliciously placed hyperlink).<\/p>\n<p>There is a <a title=\"MantisBT Bug #12165: Make it easy for users to specify domains that can load their MantisBT instance in an iframe\" href=\"http:\/\/www.mantisbt.org\/bugs\/view.php?id=12165\">some work remaining on the X-Content-Security-Policy implementation<\/a> (and by extension, the implementation of X-Frame-Options) to make it easier for plugin developers to allow remote scripts on other domains to be executed. Further to that point we need to make it easier for users to allow their MantisBT instance to be loaded within an iframe from a list of domains they trust for that purpose.<\/p>\n<p>In my November 2010 progress update I mentioned that MantisBT is one of very few web applications implementing X-Content-Security-Policy. This is still the case and we hope that other web application developers (and browser vendors) will jump on the bandwagon to provide this additional security layer to their users.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In November of 2010 I provided a progress update on work performed to ensure MantisBT 1.3.x fully supports the X-Content-Security-Policy feature of Firefox 4. At the time, MantisBT was only providing partial support of X-Content-Security-Policy due to a large amount of inline JavaScript contained within pages MantisBT was returning to clients. I am pleased to &hellip; <a href=\"https:\/\/mantisbt.org\/blog\/archives\/mantisbt\/126\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;X-Content-Security-Policy now fully implemented in MantisBT 1.3.x&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-126","post","type-post","status-publish","format-standard","hentry","category-mantisbt"],"_links":{"self":[{"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/posts\/126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/comments?post=126"}],"version-history":[{"count":1,"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/posts\/126\/revisions"}],"predecessor-version":[{"id":355,"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/posts\/126\/revisions\/355"}],"wp:attachment":[{"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/media?parent=126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/categories?post=126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mantisbt.org\/blog\/wp-json\/wp\/v2\/tags?post=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}