From f16f9df8c35b0e4363c5556142ed42aeb88ae518 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 7 Apr 2010 08:50:34 +0000 Subject: [PATCH] Fix for r64677: as reported on mediawiki-api, I forgot about clients that build their own cookies. Support this do-it-yourself method for the NeedToken error as well. --- includes/api/ApiLogin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index 8fb4604d77..39685ae4ce 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -89,8 +89,11 @@ class ApiLogin extends ApiBase { break; case LoginForm::NEED_TOKEN: + global $wgCookiePrefix; $result['result'] = 'NeedToken'; $result['token'] = $loginForm->getLoginToken(); + $result['cookieprefix'] = $wgCookiePrefix; + $result['sessionid'] = session_id(); break; case LoginForm::WRONG_TOKEN: -- 2.20.1