Last modified: 2009-07-03 20:06:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20394, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18394 - img_auth.php should use userCan
img_auth.php should use userCan
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page protection (Other open bugs)
1.14.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-07 23:01 UTC by Volodymyr
Modified: 2009-07-03 20:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Volodymyr 2009-04-07 23:01:13 UTC
If somebody is using img_auth, then they very likely are using userCan hook. Just needs one line addition (sorry for not providing the patch as attachment):
 
 if (!$title->userCanRead()) wfForbidden();

AFTER:

 $title = Title::makeTitleSafe( NS_FILE, $name );
 if( !$title instanceof Title ) {
	wfDebugLog( 'img_auth', "Unable to construct a valid Title from `{$name}`" );
	wfForbidden();
 }
Comment 1 Chad H. 2009-07-03 20:06:07 UTC
Fixed in r52751

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links