Page MenuHomePhabricator

ApiQueryCategories does not set a limit on the DB query
Closed, ResolvedPublic

Description

I noticed when reviewing the module's code that it never sets a limit on the database query; the query generated is along the lines of

SELECT  cl_from,cl_to  FROM `categorylinks`    WHERE cl_from = '2379'  ORDER BY cl_to

It looks like when paging and the cllimit parameter were added in rSVN37270, adding the LIMIT clause to the query was overlooked.

It might not hurt to double check other old modules in case the same oversight happened elsewhere.

Details

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 533092 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiQueryCategories: Supply limit for DB query

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

mobrovac triaged this task as Low priority.

Change 533092 merged by jenkins-bot:
[mediawiki/core@master] ApiQueryCategories: Supply limit for DB query

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