From 027fc6e70f7f9ce8422d4798fb02e67ff271ae4c Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 31 Jul 2014 06:43:27 +0200 Subject: Update to MediaWiki 1.22.9 --- includes/api/ApiFormatJson.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'includes/api') diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index 342a580f..4140583e 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -65,7 +65,9 @@ class ApiFormatJson extends ApiFormatBase { $callback = $params['callback']; if ( $callback !== null ) { $callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $callback ); - $this->printText( "$callback($json)" ); + # Prepend a comment to try to avoid attacks against content + # sniffers, such as bug 68187. + $this->printText( "/**/$callback($json)" ); } else { $this->printText( $json ); } -- cgit v1.2.2