Last modified: 2014-03-01 12:27:25 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 T43315, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41315 - EditPage should fail gracefully when getting incompatible model/format values
EditPage should fail gracefully when getting incompatible model/format values
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ContentHandler (Other open bugs)
1.21.x
All All
: Low normal (vote)
: 1.22.x release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 17:54 UTC by Aude
Modified: 2014-03-01 12:27 UTC (History)
5 users (show)

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


Attachments

Description Aude 2012-10-23 17:54:01 UTC
Per bug 41309 [1], it was possible to specify action=edit&model=fjlsgk (or even something like css)
 
Then click preview and see fatal exception.

https://bugzilla.wikimedia.org/show_bug.cgi?id=41309

Per Gerrit change #29616, we use only the default model and format now:

https://gerrit.wikimedia.org/r/#/c/29616/1/includes/EditPage.php

Just want to ask if there is any reason for allowing these parameters in EditPage?  If so, there were some to-do items in the code and we should implement it in a better way.

Until then, I don't see benefit of having these parameters in EditPage.
Comment 1 Daniel Kinzler 2012-10-24 14:45:48 UTC
Yes, they are needed to edit any page that uses a non-default text-based content model. For example, if there was for some reason a CSS page in the Help namespace, removing these parameters would cause the CSS to be treated as wikitext upon save.

As long as only the default content type (derived from the namespace and other parts of the page title) is used, these parameters are not needed. But as soon as this is not the case, we *will* need them.
Comment 2 Daniel Kinzler 2012-10-24 15:50:03 UTC
See also my comments to I93be7c4e
Comment 3 Daniel Kinzler 2012-10-29 18:02:16 UTC
I think we do need parameters, and editing should fail for invalid content models, but perhaps not with a fatal error or internal error. We should check earlier and report more nicely.

Shall we re-purpose this ticket for that, or shall we open a new one?
Comment 4 Aude 2012-10-29 18:04:35 UTC
either works for me.  this was mainly a discussion item but if we can decide on a solution and implement it, then bug fixed
Comment 5 Andre Klapper 2013-03-20 15:43:36 UTC
Note: As this has the 1.21.0 target milestone set (by Krinkle), somebody would have to make a decision (see comment 3 by Daniel Kinzler and comment 4 by Aude). If this does not receive a decision / patch in the next weeks, the Target Milestone will likely get removed.
Comment 6 Umherirrender 2014-01-31 19:14:09 UTC
Already fixed with bug 57615?
Comment 7 Andre Klapper 2014-02-26 15:42:35 UTC
Aude / Daniel: 

(In reply to Umherirrender from comment #6)
> Already fixed with bug 57615?
Comment 8 db [inactive,noenotif] 2014-03-01 12:27:25 UTC
Fixed with Gerrit change #97835

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


Navigation
Links