r84351 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84350‎ | r84351 | r84352 >
Date:21:19, 19 March 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Follow-up r81524: fix fatal when modules are deregistered
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -361,7 +361,8 @@
362362 }
363363
364364 /**
365 - * Filter an array of modules to remove insufficiently trustworthy members
 365+ * Filter an array of modules to remove insufficiently trustworthy members, and modules
 366+ * which are no longer registered (eg a page is cached before an extension is disabled)
366367 * @param $modules Array
367368 * @return Array
368369 */
@@ -370,7 +371,9 @@
371372 $filteredModules = array();
372373 foreach( $modules as $val ){
373374 $module = $resourceLoader->getModule( $val );
374 - if( $module->getOrigin() <= $this->getAllowedModules( $type ) ) {
 375+ if( $module instanceof ResourceLoaderModule
 376+ && $module->getOrigin() <= $this->getAllowedModules( $type ) )
 377+ {
375378 $filteredModules[] = $val;
376379 }
377380 }

Sign-offs

UserFlagDate
Nikerabbittested21:24, 19 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81524Follow-up r64670 (bug22929): cleaner implementation of security for script (a...happy-melon16:39, 4 February 2011

Status & tagging log