Special:Export only works for sysops in MediaWiki namespace
Closed, ResolvedPublic

Description

Author: broken.arrow

Description:
Trying to export any page from the MediaWiki namespace with Special:Export fails to give the page contents if the user doesn't have sysop rights on that wiki. Only the <siteinfo> section is output, the <page> section is missing.


Version: 1.12.x
Severity: minor
URL: http://en.wikipedia.org/wiki/Special:Export

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz12793.
bzimport created this task.Via LegacyJan 26 2008, 12:16 AM
brion added a comment.Via ConduitJan 26 2008, 12:19 AM

Fixed in r30160.

SpecialExport.php was using $title->userCan('read'), which is alas *not* the same as $title->userCanRead(). It seems to return a result as if you wanted to edit or something...

This is horribly wrong and the permissions code should be fixed; for now I've replaced the guilty call with the userCanRead() which appears to return the correct result (same as the main wiki can-read check).

Add Comment