diff options
author | George Hazan <ghazan@miranda.im> | 2021-07-17 19:48:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-07-17 19:48:24 +0300 |
commit | 79aeffd07b1211308c5f80150837aff3523fe936 (patch) | |
tree | 00c1f0483128c1f3cb6c76477e0bb0293631b6f7 /protocols/ICQ-WIM/src/server.cpp | |
parent | ec856b6883cc7e3dbf80b7e55981b1dfd30995e2 (diff) |
fixes #2934 (MRA: авторизация по логину-паролю больше не возможна)
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 2525482ec7..c650fc2224 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -89,7 +89,16 @@ void CIcqProto::CheckPassword() m_szAToken = getMStringA(DB_KEY_ATOKEN); m_iRClientId = getDword(DB_KEY_RCLIENTID); m_szSessionKey = getMStringA(DB_KEY_SESSIONKEY); - if (m_szAToken.IsEmpty() || m_szSessionKey.IsEmpty()) { + if (!m_szAToken.IsEmpty() && !m_szSessionKey.IsEmpty()) { + StartSession(); + return; + } + + if (m_isMra) { + m_bError462 = false; + SendMrimLogin(nullptr); + } + else { auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_POST, "https://api.login.icq.net/auth/clientLogin", &CIcqProto::OnCheckPassword); pReq << CHAR_PARAM("clientName", "Miranda NG") << CHAR_PARAM("clientVersion", mirVer) << CHAR_PARAM("devId", ICQ_APP_ID) << CHAR_PARAM("f", "json") << CHAR_PARAM("tokenType", "longTerm") << WCHAR_PARAM("s", m_szOwnId) << CHAR_PARAM("pwd", m_szPassword); @@ -98,7 +107,6 @@ void CIcqProto::CheckPassword() #endif Push(pReq); } - else StartSession(); } IcqFileInfo* CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, bool &bIsFile) |