Allow extra slots in write-both/read-new mode.
[lhc/web/wiklou.git] / includes / ContentSecurityPolicy.php
index 21d7d57..66a3535 100644 (file)
@@ -326,7 +326,10 @@ class ContentSecurityPolicy {
                $reportUri = wfAppendQuery( wfScript( 'api' ), $apiArguments );
 
                // Per spec, ';' and ',' must be hex-escaped in report uri
-               $reportUri = $this->escapeUrlForCSP( $reportUri );
+               // Also add an & at the end of url to work around bug in hhvm
+               // with handling of POST parameters when always_decode_post_data
+               // is set to true. See https://github.com/facebook/hhvm/issues/6676
+               $reportUri = $this->escapeUrlForCSP( $reportUri ) . '&';
                return $reportUri;
        }