summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2018-10-01 19:34:21 +0500
committerElzorFox <elzorfox@ya.ru>2018-10-01 19:34:41 +0500
commitc167a087f8a820a6984f136b73c50b946d2126e0 (patch)
tree4b44ffbe545c25a223d130f9e8ed82866027a1c6
parente808179197e8875f3faa85ad8f0d1e75d756716f (diff)
VKontakte:
fix 2FA (not all of parameters ‘api_hash’ are equally useful. suddenly) version bump
-rw-r--r--protocols/VKontakte/src/version.h2
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h
index 46b5f285c1..2f84f0faaa 100644
--- a/protocols/VKontakte/src/version.h
+++ b/protocols/VKontakte/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 6
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 2690a38c2c..53c5bd2ff8 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -21,6 +21,7 @@ UINT_PTR CVkProto::m_timer;
mir_cs CVkProto::m_csTimer;
char szBlankUrl[] = "https://oauth.vk.com/blank.html";
+char sz2FA[] = "https://m.vk.com/login?act=authcheck";
static char VK_TOKEN_BEG[] = "access_token=";
static char VK_LOGIN_DOMAIN[] = "https://m.vk.com";
static char fieldsName[] = "id, first_name, last_name, photo_100, bdate, sex, timezone, "
@@ -177,6 +178,8 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
ApplyCookies(pRedirectReq);
m_prevUrl = pRedirectReq->m_szUrl;
}
+ if (!_strnicmp(pszLocation, sz2FA, sizeof(sz2FA) - 1))
+ pRedirectReq->m_szUrl = sz2FA;
pRedirectReq->m_bApiReq = false;
pRedirectReq->bIsMainConn = true;
Push(pRedirectReq);