summaryrefslogtreecommitdiff
path: root/includes/api/ApiLogin.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-09-04 05:51:59 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-09-04 05:51:59 +0200
commit91e194556c52d2f354344f930419eef2dd6267f0 (patch)
tree0cd12490d3cd3499274017c9b799d0f738d3719e /includes/api/ApiLogin.php
parent08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (diff)
Update to MediaWiki 1.21.2
Diffstat (limited to 'includes/api/ApiLogin.php')
-rw-r--r--includes/api/ApiLogin.php9
1 files changed, 9 insertions, 0 deletions
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();