@@ -555,7 +555,7 @@ void Login::PerformLoginPart2(WikiSite *site)
555555 this ->Statuses [site] = WaitingForToken;
556556 this ->LoginQueries .remove (site);
557557 query->DecRef ();
558- query = new ApiQuery (ClientLogin , site);
558+ query = new ApiQuery (ActionClientLogin , site);
559559 this ->LoginQueries .insert (site, query);
560560 // query->HiddenQuery = true;
561561 query->IncRef ();
@@ -1286,12 +1286,14 @@ bool Login::ProcessOutput(WikiSite *site)
12861286 if (true ){
12871287 // 2FA is requierd (TOTP code needed)
12881288 QString totp = QInputDialog::getText (this , " Two factor authentification" , " Please enter the 2FA code from your device:" );
1289- query = new ApiQuery (ClientLogin , site);
1289+ query = new ApiQuery (ActionClientLogin , site);
12901290 // query->HiddenQuery = true;
12911291 query->IncRef ();
12921292 query->Parameters = " username=" + QUrl::toPercentEncoding (hcfg->SystemConfig_BotLogin )
12931293 + " &password=" + QUrl::toPercentEncoding (hcfg->TemporaryConfig_Password )
1294- + " &OATHToken=" + totp + " &loginreturnurl=http://example.com/&rememberMe=1&logintoken=" + QUrl::toPercentEncoding (this ->Tokens [site]);
1294+ + " &OATHToken=" + totp +
1295+ + " &logintoken=" + QUrl::toPercentEncoding (this ->Tokens [site])
1296+ + " &logincontinue=1&rememberMe=1" ;
12951297 query->UsingPOST = true ;
12961298 query->Process ();
12971299 ApiQueryResult *result = query->GetApiQueryResult ();
0 commit comments