Page MenuHomePhabricator

uclimit ignored when using POST
Closed, InvalidPublic

Description

Author: bugzilla

Description:
uclimit seems to be ignored when using POST and "list=usercontribs". I noticed while using MediaWiki::API that queries to list=usercontribs are giving an HTTP error. After playing around a bit I noticed that the HTTP error does not occur when querying users with a small number of contributions, but that uclimit is being ignored. However, things seem to work fine when using GET. Therefore, I think it's a problem with POST, but I couldn't find the exact code causing the problem. To reproduce:

#!/usr/bin/perl

use MediaWiki::API;

my $mw=MediaWiki::API->new();
$mw->{config}->{api_url} = 'http://en.wikipedia.org/w/api.php';

my $items = $mw->list ( {

action => 'query',
list => 'usercontribs',
ucuser => '202.129.83.118',
uclimit => '1',

ucdir => 'newer',

} ) || die $mw->{error}->{code} . ': ' . $mw->{error}->{details};

foreach (@{$items}) {

print "$_->{pageid}\n";

}


Version: unspecified
Severity: major

Details

Reference
bz15594

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:20 PM
bzimport set Reference to bz15594.

bugzilla wrote:

Nevermind, this is either a bug in MediaWiki::API or a mistake in my script, depending on how you look at it. MediaWiki::API apparently repeatedly queries the server unless a "max" parameter is set.