Skip to content

Commit 3e68481

Browse files
committed
improvements
1 parent af06a68 commit 3e68481

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

huggle/apiquery.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ void ApiQuery::SetAction(const Action action)
417417
this->ActionPart = "login";
418418
this->EnforceLogin = false;
419419
return;
420-
case ClientLogin:
420+
case ActionClientLogin:
421421
this->ActionPart = "clientlogin";
422422
this->EnforceLogin = false;
423423
return;

huggle/apiquery.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Huggle
3131
ActionClearHasMsg,
3232
ActionQuery,
3333
ActionLogin,
34-
ClientLogin,
34+
ActionClientLogin,
3535
ActionLogout,
3636
//ActionTokens,
3737
ActionPurge,

huggle/login.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)