Last modified: 2011-05-20 17:19:20 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 T30578, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28578 - API's parse module should not silently override invalid title inputs
API's parse module should not silently override invalid title inputs
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-16 18:10 UTC by MZMcBride
Modified: 2011-05-20 17:19 UTC (History)
5 users (show)

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


Attachments

Description MZMcBride 2011-04-16 18:10:01 UTC
When action=parse receives an invalid title input, it defaults to returning:
<parse displaytitle="API">

This can be seen at <http://en.wikipedia.org/w/api.php?action=parse&title=[a>.

This behavior is unexpected and wrong.
Comment 1 Roan Kattouw 2011-04-17 08:32:22 UTC
(In reply to comment #0)
> This behavior is unexpected and wrong.
What should it do, in your opinion? Die with an error?
Comment 2 MZMcBride 2011-04-17 17:54:04 UTC
(In reply to comment #1)
> (In reply to comment #0)
>> This behavior is unexpected and wrong.
> What should it do, in your opinion? Die with an error?

Something like that, yes. It looks like the behavior of other modules that receive invalid titles is to mark the title as invalid (e.g., <http://en.wikipedia.org/w/api.php?action=query&titles=abc|abc{>). Perhaps doing the same here makes sense. I'm not sure what the correct behavior is, I just know that returning displaytitle="API" is wrong.

In this particular case, parsing can be (and is) context-specific (i.e., the title can definitely alter what is returned), so perhaps flatly dying with an error makes more sense.
Comment 3 Sam Reed (reedy) 2011-05-20 17:19:20 UTC
r88468

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


Navigation
Links