Last modified: 2010-09-25 11:38:40 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 T27290, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25290 - ArticleAssessmentPilot: parameter validation
ArticleAssessmentPilot: parameter validation
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Other (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-24 22:55 UTC by Gurch
Modified: 2010-09-25 11:38 UTC (History)
3 users (show)

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


Attachments

Description Gurch 2010-09-24 22:55:42 UTC
ArticleAssessmentPilot hasn't been properly launched, but the API is live and functioning, so I tested it.

http://en.wikipedia.org/w/api.php?action=query&list=articleassessment&aapageid=19161823

As the above link shows, [[User:Gurch]] now scores 9999 out of 5 for sourcing. Validating the ratings might be wise.
Comment 1 Sam Reed (reedy) 2010-09-25 11:07:45 UTC
It has, it's been live since mid this week. See https://blog.wikimedia.org/blog/2010/09/22/article-feedback-pilot-goes-live/ and it's inclusion category http://en.wikipedia.org/wiki/Category:Article_Feedback_Pilot

The API isn't really designed for end user interaction...

Also

		foreach( $wgArticleAssessmentRatings as $rating ) {
			$ret["r{$rating}"] = array(
				ApiBase::PARAM_TYPE => 'integer',
				ApiBase::PARAM_DFLT => 0,
				ApiBase::PARAM_MIN => 0,
				ApiBase::PARAM_MAX => 5,
			);
		}

The module is offloading the parameter validation to the core API, so it would seem it's a core API bug.. At a guess, it's due to there being no MAX2

CC'ing Roan.
Comment 2 Sam Reed (reedy) 2010-09-25 11:16:44 UTC
Scrap the MAX2 coment, that's only the case for 'limit' type.
Comment 3 Sam Reed (reedy) 2010-09-25 11:34:05 UTC
r73742

As per the CR, "Maybe we should have a PARAM_MAX_ENFORCE. Rather than just warning!"
Comment 4 Sam Reed (reedy) 2010-09-25 11:38:40 UTC
r73743 actually, goddamit!

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


Navigation
Links