Last modified: 2007-09-10 07:48:58 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 T10759, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8759 - Disallow rollback when the user is unable to edit the page
Disallow rollback when the user is unable to edit the page
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-24 20:40 UTC by Travis D
Modified: 2007-09-10 07:48 UTC (History)
1 user (show)

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


Attachments

Description Travis D 2007-01-24 20:40:57 UTC
Hi,

I've been able to reproduce this on MW 1.8.3. If your wiki configuration allows
regular users on a wiki to be able to rollback edits, they are able to rollback
edits on protected pages, even though they can't directly edit them. 

I fixed this on our site by changing Article:rollback by adding: 


        if ( ! $this->mTitle->userCanEdit() ) {
            wfDebug( "$fname: user can't edit\n" );
            $wgOut->readOnlyPage( $this->mArticle->getContent(), true );
            wfProfileOut( $fname );
            return;
        }

to the function rollback and changing in DifferenceEngine.php on line 150 from: 

 if ( $this->mNewRev->isCurrent() && $wgUser->isAllowed('rollback') ) {

to

 if ( $this->mNewRev->isCurrent() && $wgUser->isAllowed('rollback') &&
$this->mTitle->userCanEdit()) {
Comment 1 Andrew Garrett 2007-09-10 07:48:58 UTC
Fixed in r25719, with a different patch.

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


Navigation
Links