Merge "Make calling wfMangleFlashPolicy configurable"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 19 Nov 2014 20:14:03 +0000 (20:14 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 19 Nov 2014 20:14:03 +0000 (20:14 +0000)
RELEASE-NOTES-1.25
includes/DefaultSettings.php
includes/OutputHandler.php

index 3531cac..ae1c23e 100644 (file)
@@ -21,6 +21,8 @@ production.
   RequestContext specifically.
 * Profiling was restructured and $wgProfiler now requires an 'output' parameter.
   See StartProfiler.sample for details.
+* $wgMangleFlashPolicy was added to make MediaWiki's mangling of anything that
+  might be a flash policy directive configurable.
 
 === New features in 1.25 ===
 * (bug 62861) Updated plural rules to CLDR 26. Includes incompatible changes
index 65ad403..f93737c 100644 (file)
@@ -3194,6 +3194,14 @@ $wgShowRollbackEditCount = 10;
  */
 $wgEnableCanonicalServerLink = false;
 
+/**
+ * When OutputHandler is used, mangle any output that contains
+ * <cross-domain-policy>. Without this, an attacker can send their own
+ * cross-domain policy unless it is prevented by the crossdomain.xml file at
+ * the domain root.
+ */
+$wgMangleFlashPolicy = true;
+
 /** @} */ # End of output format settings }
 
 /*************************************************************************//**
index b3b3b88..b0bbcdd 100644 (file)
  * @return string
  */
 function wfOutputHandler( $s ) {
-       global $wgDisableOutputCompression, $wgValidateAllHtml;
-       $s = wfMangleFlashPolicy( $s );
+       global $wgDisableOutputCompression, $wgValidateAllHtml, $wgMangleFlashPolicy;
+       if ( $wgMangleFlashPolicy ) {
+               $s = wfMangleFlashPolicy( $s );
+       }
        if ( $wgValidateAllHtml ) {
                $headers = headers_list();
                $isHTML = false;