Last modified: 2013-09-11 17:43:37 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 T53383, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51383 - Reloading the page after reverting a file performs the revert again
Reloading the page after reverting a file performs the revert again
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.22.0
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-15 18:47 UTC by Jesús Martínez Novo (Ciencia Al Poder)
Modified: 2013-09-11 17:43 UTC (History)
4 users (show)

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


Attachments

Description Jesús Martínez Novo (Ciencia Al Poder) 2013-07-15 18:47:23 UTC
Steps to reproduce:

1. Go to any file description page with more than 1 file in the file revision
   history.
2. Hit the revert link on any file of the file history.
3. Click on the confirm button to actually perform the revert.
4. Hit F5 and accept the browser confirmation dialog (if any).

Results:

The revert is performed again whenever F5 is hit.

Expected results:

No more than a single revert should be done when reloading the page.

This may be done by doing a redirect to a different page once the revert is successful, like what is done after saving an edit or uploading a new file, so hitting F5 doesn't send the form again.

Another solution could be to check if the revert is going to upload the same file as the last version of the file. This would also help when people gets crazy when the cache isn't properly invalidated and start reverting the same file again and again... preventing this flood from happening.
Comment 1 Bryan Tong Minh 2013-09-10 17:12:46 UTC
Well, that is the whole point of the browser confirmation dialog. In Firefox it states "[...]Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier". If you don't want to perform that action, click Cancel. 

I suggest WONTFIX, since this is expected behavior.
Comment 2 Jesús Martínez Novo (Ciencia Al Poder) 2013-09-10 20:07:39 UTC
While I agree that the browser issues a warning, this has been resolved for page editing where this doesn't happen.

Also, it can be used to perform a massive upload attack to quickly fill-up disk space and flood logs and recentchanges, by just reverting a huge file hitting F5 endlessly. And possibly resulting in a DOS.

Changing to enhancement for now, unless someone else thinks this may be a real issue.
Comment 3 Bawolff (Brian Wolff) 2013-09-10 22:01:00 UTC
I'm more concerned that this implies if two people revert a file at the same time, no conflict warning is issued. I think that's something that should be fixed

If people want to dos, fixing this wouldn't prevent them, it would just set the bar marginally higher.
Comment 4 Bryan Tong Minh 2013-09-11 17:43:37 UTC
Good point. We could solve this by generating the edit token based on the timestamp of the file.

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


Navigation
Links