diff options
author | George Hazan <ghazan@miranda.im> | 2020-12-20 16:52:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-12-20 16:52:04 +0300 |
commit | e8f02156813b7153d4970fd83f2e6adac3517923 (patch) | |
tree | 49632cf70e8dc0f6b464a0bbc6e06e0c88c2ca90 /protocols/SkypeWeb/src/requests/login.h | |
parent | ab6c868bccb088d493ab4016fd1918d822adfc2b (diff) |
SkypeWeb: protocol reworked almost from scratch to support contact types other than 8 & 19
Diffstat (limited to 'protocols/SkypeWeb/src/requests/login.h')
-rw-r--r-- | protocols/SkypeWeb/src/requests/login.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/requests/login.h b/protocols/SkypeWeb/src/requests/login.h index da293572e5..fa3a9148c6 100644 --- a/protocols/SkypeWeb/src/requests/login.h +++ b/protocols/SkypeWeb/src/requests/login.h @@ -24,14 +24,18 @@ struct LoginOAuthRequest : public AsyncHttpRequest AsyncHttpRequest(REQUEST_POST, HOST_API, "/login/skypetoken", &CSkypeProto::OnLoginOAuth)
{
username.MakeLower();
- CMStringA hashStr(::FORMAT, "%s\nskyper\n%s", username.c_str(), password);
+ const char *pszLogin = username;
+ if (int iOffset = username.Find(':'))
+ pszLogin += iOffset + 1;
+
+ CMStringA hashStr(::FORMAT, "%s\nskyper\n%s", pszLogin, password);
BYTE digest[16];
mir_md5_hash((const BYTE*)hashStr.GetString(), hashStr.GetLength(), digest);
this << CHAR_PARAM("scopes", "client")
<< CHAR_PARAM("clientVersion", mir_urlEncode("0/7.4.85.102/259/").c_str())
- << CHAR_PARAM("username", mir_urlEncode(username).c_str())
+ << CHAR_PARAM("username", mir_urlEncode(pszLogin).c_str())
<< CHAR_PARAM("passwordHash", mir_urlEncode(ptrA(mir_base64_encode(digest, sizeof(digest)))).c_str());
}
};
|