Last modified: 2013-04-08 11:02:36 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 T26997, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24997 - Article::doEdit() can have fatal side effect
Article::doEdit() can have fatal side effect
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.16.x
All All
: Low major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-31 12:45 UTC by Niklas Laxström
Modified: 2013-04-08 11:02 UTC (History)
2 users (show)

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


Attachments

Description Niklas Laxström 2010-08-31 12:45:41 UTC
Sometimes the wrong article is edited, because Article::doEdit() has side effect. I tracked it down doEdit > prepareTextForEdit > getContent -> loadContent which calls getOldID() which calls request parameters, and after that calls fetchContent which updates mTitle.

This is seen at least in 1.16.0, probably happens in trunk too.
Comment 1 Niklas Laxström 2010-08-31 12:48:51 UTC
Translate extension is using the jobqueue to update articles. They construct their own article object and call doEdit on it.
Comment 2 Roan Kattouw 2010-09-12 15:23:23 UTC
The real issue here is the fact that Article::getOldID() accesses the request parameters (evil) and allows them to override mTitle (very evil).
Comment 3 Platonides 2010-09-12 21:39:43 UTC
So... fixed as r72846?
Comment 4 Niklas Laxström 2010-09-13 05:47:12 UTC
Nope, it's just one caller which was hit by this bug.
Comment 5 Niklas Laxström 2012-10-29 15:11:16 UTC
Looks like this has been resolved. Nothing is calling Article::loadContent (deprecated in favor of Article::fetchContent (deprecated in favor of Article::fetchContentObject))

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


Navigation
Links