Last modified: 2014-03-08 08:07:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12873 - incorrect rollback reports
incorrect rollback reports
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 17350 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-02 03:18 UTC by Danny
Modified: 2014-03-08 08:07 UTC (History)
4 users (show)

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


Attachments

Description Danny 2008-02-02 03:18:25 UTC
I've noticed that if I revert a page using rollback and another user reverts the page right before me, it would often tell me that I reverted the page, even though I did not.
Comment 1 Roan Kattouw 2008-02-02 17:27:43 UTC
Can you provide an example?
Comment 2 Danny 2008-02-02 20:42:09 UTC
It is a bit hard to explain, but here is an example. Suppose that there is a vandal (Mallory) and two users with rollback access (Alice and Bob).

Mallory vandalizes a page, and both Alice and Bob try to revert it, with Alice beating Bob by about a second. When Bob tries to revert the page, he may get a message telling him that he reverted the page, instead of one saying that the page has already been reverted.
Comment 3 Roan Kattouw 2008-02-02 22:27:23 UTC
(In reply to comment #2)
> It is a bit hard to explain, but here is an example. Suppose that there is a
> vandal (Mallory) and two users with rollback access (Alice and Bob).
> 
> Mallory vandalizes a page, and both Alice and Bob try to revert it, with Alice
> beating Bob by about a second. When Bob tries to revert the page, he may get a
> message telling him that he reverted the page, instead of one saying that the
> page has already been reverted.

I know the rollback code pretty well, and this is close to impossible. Every rollback link contains a token, which is basically a number calculated using your session ID, the name of the page and the name of the user who last edited the page. If someone edits the page between you viewing the history page and clicking the rollback link, the latter of those three will have changed and the token will be invalid, triggering an error like "we could not process your request due to a loss of session data. Please try again".

It would, of course, be theoretically possible that an edit was saved between checking the token and actually committing the rollback. However, such race conditions are more or less inevitable. We could add a paranoia check right before committing the rollback, though. Thoughts?
Comment 4 Roan Kattouw 2008-02-02 22:37:34 UTC
(In reply to comment #3)
> If someone edits the page between you viewing the history page and
> clicking the rollback link, the latter of those three will have changed and the
> token will be invalid, triggering an error like "we could not process your
> request due to a loss of session data. Please try again".

I looked more closely and it's not exactly like that, it's even better. The name of the user whose edits you're rolling back is also included in the rollback link, and is compared to the name of the user who last edited the page. If they're not the same, the [[MediaWiki:alreadyrolled]] error message is output. Unfortunately, this information is retrieved from the slave, so this bug would be caused by replag. Maybe Revision::newFromTitle() should have a parameter indicating whether to load from master or slave?
Comment 5 Danny 2008-02-03 00:00:19 UTC
It seems that the rollback code is partially correct.

On the English Wikipedia, there are several instances where ClueBot (a very fast anti-vandalism bot) beats me to the revert. I sometimes get the following message:

"Reverted edits by <vandal>; changed back to last version by ClueBot."

The software recognizes that ClueBot has edited the page, but it does not realize that I wasn't the one that reverted it. If I go back and click the "rollback" link again, it gives the correct "unable to proceed" message.
Comment 6 Roan Kattouw 2008-02-03 11:49:19 UTC
Please check that the history isn't something like:

Vandal: more vandalism
Vandal: vandalism
ClueBot: reverted Vandal2 <--- this is the rev you're reverting to
Vandal2: vandalism

In that case, the message would be correct.

Of course, it's possible that this is a race condition, maybe we should add a paranoia check just before rolling back.
Comment 7 Chad H. 2009-02-17 19:12:41 UTC
*** Bug 17350 has been marked as a duplicate of this bug. ***
Comment 8 db [inactive,noenotif] 2014-03-08 08:07:50 UTC
Should be fixed with Gerrit change #102550

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


Navigation
Links