From 45c1f4c2df7d235aa1792e896477c5bf8395213f Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 11 Sep 2013 13:57:09 -0700 Subject: [PATCH] API: Enforce limit max in ApiQueryBacklinks Change-Id: Id0f0943771e3593c30563469df4820437ded9a99 --- includes/api/ApiQueryBacklinks.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index e39c25ac44..2d1089a733 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -255,6 +255,9 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { if ( $this->params['limit'] == 'max' ) { $this->params['limit'] = $this->getMain()->canApiHighLimits() ? $botMax : $userMax; $result->setParsedLimit( $this->getModuleName(), $this->params['limit'] ); + } else { + $this->params['limit'] = intval( $this->params['limit'] ); + $this->validateLimit( 'limit', $this->params['limit'], 1, $userMax, $botMax ); } $this->processContinue(); -- 2.20.1