Last modified: 2010-10-03 20:53:00 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 T27303, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25303 - Fix API parameter integer validation to actually enforce validation on the input values in addition to giving a warning. Also add flag to enforce (die) if integer out of range
Fix API parameter integer validation to actually enforce validation on the in...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-25 11:40 UTC by Sam Reed (reedy)
Modified: 2010-10-03 20:53 UTC (History)
5 users (show)

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


Attachments

Description Sam Reed (reedy) 2010-09-25 11:40:42 UTC
Per bug 25290, have a way of getting the API to die if value provided > max, rather than just warning and using max for limit, or just using the value literally as integer (ouch)
Comment 1 Gurch 2010-09-25 11:53:47 UTC
Useful to have, but warning and using max for limit is usually OK, it's warning and then using the original value that is the problem.
Comment 2 Gurch 2010-10-03 16:58:16 UTC
Changing severity from 'enhancement' to 'normal'. The current behavior, is, if not actually broken, at least very misleading for extension authors expecting the API to validate their parameters -- happened once, and will happen again.

The validation should be changed to restrict values to within the min/max range by default, as well as issuing a warning. Technically this is a BREAKING CHANGE (omg), but I can't imagine anyone is relying on the existing behavior.

Dying with an error on out of range values is an enhancement that could be added separately.

Changed summary to better describe the problem.
Comment 3 Sam Reed (reedy) 2010-10-03 20:32:29 UTC
Done in r74230, 74232, 74234, 74235

Made the "breaking change", need to announce that (no urgency, but will do)

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


Navigation
Links