From 91e194556c52d2f354344f930419eef2dd6267f0 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 4 Sep 2013 05:51:59 +0200 Subject: Update to MediaWiki 1.21.2 --- includes/api/ApiLogin.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'includes/api/ApiLogin.php') diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index b936d3be..b51d441d 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -46,6 +46,15 @@ class ApiLogin extends ApiBase { * is reached. The expiry is $this->mLoginThrottle. */ public function execute() { + // If we're in JSON callback mode, no tokens can be obtained + if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) { + $this->getResult()->addValue( null, 'login', array( + 'result' => 'Aborted', + 'reason' => 'Cannot log in when using a callback', + ) ); + return; + } + $params = $this->extractRequestParams(); $result = array(); -- cgit v1.2.3-54-g00ecf