Page MenuHomePhabricator

wikilambda_fetch zids parameter not declared as PARAM_ISMULTI
Closed, ResolvedPublic

Description

The zids parameter of the wikilambda_fetch API action takes multiple ZIDs, but doesn’t properly declare this in the API parameters; it’s only explained in prose in the parameter documentation, and then the execute() method manually explode()s the param value.

Screenshot from 2021-07-20 22-22-38.png (385×725 px, 36 KB)

It should declare the parameter as PARAM_ISMULTI, so that e.g. the API sandbox properly supports working with multiple values, as it does for other parameters:

Screenshot from 2021-07-20 22-23-14.png (201×960 px, 27 KB)

With this, MediaWiki will not only split the value for you, it’ll also apply limits so that users don’t request thousands of objects at once.

Event Timeline

Same goes for the wikilambdaload_zids parameter of the wikilambdaload_zobjects query+list module.

Change 705738 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/extensions/WikiLambda@master] Declare PARAM_ISMULTI for zids parameters

https://gerrit.wikimedia.org/r/705738

Change 705738 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Declare PARAM_ISMULTI for zids parameters

https://gerrit.wikimedia.org/r/705738

Looks good on Not Wikilambda now :)

Screenshot from 2021-07-21 13-53-55.png (424×977 px, 49 KB)