r68812 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68811‎ | r68812 | r68813 >
Date:03:44, 1 July 2010
Author:bawolff
Status:ok
Tags:
Comment:
(Bug 22675) Fix DynamicPageList (3rd party) to work with mediawiki post r61913

All this does is make the extension work like it used to. However I find the aproach
this extension takes to included html to be rather scary. I'm a bit hesitent to commit this
as I think it might have security issues - however its no different from previous versions of this
extension. I fixed some of the obvious security issues in r68811 but I fear there might be more.
Modified paths:
  • /trunk/extensions/DynamicPageList/DPLMain.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DynamicPageList/DPLMain.php
@@ -25,6 +25,11 @@
2626 // note that this does not affect the article wiki source - a <html> tag in the wiki source
2727 // will only be accepted if $rawHtml was set to true in the LocalSettings.php
2828 $wgRawHtml = true;
 29+ //newer mediawiki needs the following:
 30+ if (method_exists('CoreTagHooks', 'html')) {
 31+ $parser->setHook( 'html', array( 'CoreTagHooks', 'html' ) );
 32+ }
 33+ //note, the above is hacky and insecure....
2934
3035 // logger (display of debug messages)
3136 $logger = new DPLLogger();
@@ -2471,10 +2476,6 @@
24722477 }
24732478
24742479 if ( $sLastRevisionBefore . $sAllRevisionsBefore . $sFirstRevisionSince . $sAllRevisionsSince != '' ) {
2475 - // later during output we are going to create html links to the revisions, so we must enable RawHtml
2476 - // wiki syntax does not support links to revisions as far as I know -- gs
2477 - global $wgRawHtml;
2478 - $wgRawHtml = true;
24792480
24802481 $sSqlRevisionTable = $sRevisionTable . ' AS rev, ';
24812482 $sSqlRev_timestamp = ', rev_timestamp';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61913* Fix for r57997 and bug 21222: move math, gallery, pre and nowiki to a new m...tstarling07:10, 3 February 2010
r68811Some security fixes to the DynamicPageList (third party) extension...bawolff03:05, 1 July 2010

Status & tagging log