Page MenuHomePhabricator

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


Author: broken.arrow

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



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:04 PM
bzimport set Reference to bz12793.
bzimport added a subscriber: Unknown Object (MLST).

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).