diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2005-08-29 23:56:50 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2005-08-29 23:56:50 +0000 |
commit | 646b3837531c2c40c2fbec658c710d1be27935a8 (patch) | |
tree | 1050f1b0a33ae4d4fcd8e3294a3118cf0270169d | |
parent | 3fd134cc398b785023240d8cdf3f9b0f7e386f2b (diff) |
Bump to 1.3.15:1.3.15
* Security fix for <math>
* Security fix for tables
Notes
http://mediawiki.org/wiki/Special:Code/MediaWiki/10837
-rw-r--r-- | RELEASE-NOTES | 13 | ||||
-rw-r--r-- | includes/Article.php | 2 | ||||
-rw-r--r-- | includes/DefaultSettings.php | 2 | ||||
-rw-r--r-- | includes/Parser.php | 12 |
4 files changed, 21 insertions, 8 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e04470379c96..eeebb5624800 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -3,6 +3,19 @@ Security reminder: MediaWiki does not require PHP's register_globals setting since version 1.2.0. If you have it on, turn it *off* if you can. +== MediaWiki 1.3.15, 2005-08-29 == + +MediaWiki 1.3.15 is a security maintenance release. It corrects across-site +scripting security bug: + +* <math> tags were handled incorrectly when TeX rendering support is off, + as in the default configuration. + +Wikis where the optional math support has been *enabled* are not vulnerable. + +The 1.3.x series is no longer maintained except for security fixes; +new users and those seeking bug fixes should upgrade to 1.4.9 or 1.5.0. + == Version 1.3.14, 2005-08-23 == diff --git a/includes/Article.php b/includes/Article.php index 73a9da367052..f9c961a1c1ef 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -258,6 +258,7 @@ class Article { $striparray=array(); $parser=new Parser(); $parser->mOutputType=OT_WIKI; + $parser->mOptions = new ParserOptions(); $striptext=$parser->strip($text, $striparray, true); # now that we can be sure that no pseudo-sections are in the source, @@ -823,6 +824,7 @@ class Article { $striparray=array(); $parser=new Parser(); $parser->mOutputType=OT_WIKI; + $parser->mOptions = new ParserOptions(); $oldtext=$parser->strip($oldtext, $striparray, true); # now that we can be sure that no pseudo-sections are in the source, diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 240aa967487e..02c318c4422d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -9,7 +9,7 @@ if( defined( "MEDIAWIKI" ) ) { # like $wgScriptPath, you must also localize everything that # depends on it. -$wgVersion = '1.3.14'; +$wgVersion = '1.3.15'; $wgSitename = 'MediaWiki'; # Please customize! $wgMetaNamespace = FALSE; # will be same as you set $wgSitename diff --git a/includes/Parser.php b/includes/Parser.php index 3172def416f9..b2d4fea2fe94 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -221,16 +221,14 @@ class Parser } # math - $text = Parser::extractTags('math', $text, $math_content, $uniq_prefix); - foreach( $math_content as $marker => $content ){ - if( $render ) { - if( $this->mOptions->getUseTeX() ) { + if( $this->mOptions->getUseTeX() ) { + $text = Parser::extractTags('math', $text, $math_content, $uniq_prefix); + foreach( $math_content as $marker => $content ){ + if( $render ) { $math_content[$marker] = renderMath( $content ); } else { - $math_content[$marker] = "<math>$content<math>"; + $math_content[$marker] = "<math>$content</math>"; } - } else { - $math_content[$marker] = "<math>$content</math>"; } } |