Security Flaw

Jump to: navigation, search

This also applies to inclusion {{:Page}} of redirects #REDIRECT:[[Protected:Page]].

TiCPU 13:30, 3 August 2011 (UTC)13:30, 3 August 2011

For myself I fixed it using:

diff -udpr includes//parser/Parser.php /root/mediawiki/mediawiki-1.16.4/includes/parser/Parser.php
--- includes//parser/Parser.php 2011-08-03 09:43:32.000000000 -0400
+++ /root/mediawiki/mediawiki-1.16.4/includes/parser/Parser.php 2010-05-11 22:12:12.000000000 -0400
@@ -3154,7 +3154,7 @@ class Parser
                $deps = array();
 
                // Loop to fetch the article, with up to 1 redirect
-               for ( $i = 0; $i < 1 && is_object( $title ); $i++ ) {
+               for ( $i = 0; $i < 2 && is_object( $title ); $i++ ) {
                        # Give extensions a chance to select the revision instead
                        $id = false; // Assume current
                        wfRunHooks( 'BeforeParserFetchTemplateAndtitle', array( $parser, &$title, &$skip, &$id ) );

Almost the same as removing the loop, Mediawiki won't fetch redirect in inclusion now.

TiCPU13:49, 3 August 2011

My configuration is MW 1.17 with LdapAuthentication 1.2d.

I have restricted access to a page by moving it in a NS_protected namespace.

My lockdown configuration is : $wgNamespacePermissionLockdown[NS_protected]['read'] = array('mygroup');

This work fine but not with page inclusion {{:NS_protected:Page}} or redirection #REDIRECT:[[NS_protected:Page]].

I have tried to patch Parser.php like TiCPU but still have the problem.

Klausla09:17, 8 September 2011
 
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox