diff options
author | George Hazan <george.hazan@gmail.com> | 2024-12-19 21:11:32 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-12-19 21:11:32 +0300 |
commit | 38d2ffd33244be6145976c7a30b87fa6fabc565d (patch) | |
tree | e2bd8d937c2e802257867b2e2245d75708b327ef | |
parent | e1ce8dafa01406edc8b2e3540c3f7a4ae3bdfadd (diff) |
fixes #4810 (Skype: Will not login)
-rw-r--r-- | protocols/SkypeWeb/src/skype_oauth.cpp | 21 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 1 |
2 files changed, 2 insertions, 20 deletions
diff --git a/protocols/SkypeWeb/src/skype_oauth.cpp b/protocols/SkypeWeb/src/skype_oauth.cpp index 1a8efc2447..5f35dba385 100644 --- a/protocols/SkypeWeb/src/skype_oauth.cpp +++ b/protocols/SkypeWeb/src/skype_oauth.cpp @@ -63,11 +63,7 @@ void CSkypeProto::OnOAuthStart(MHttpResponse *response, AsyncHttpRequest*) ptrA login(getStringA(SKYPE_SETTINGS_ID));
ptrA password(getStringA(SKYPE_SETTINGS_PASSWORD));
- CMStringA mscookies(FORMAT, "MSPRequ=%s;MSPOK=%s;CkTst=G%lld;", scookies["MSPRequ"].c_str(), scookies["MSPOK"].c_str(), time(NULL));
-
- cookies["MSPRequ"] = scookies["MSPRequ"];
-
- PushRequest(new OAuthRequest(login, password, mscookies.c_str(), PPFT.c_str()));
+ PushRequest(new OAuthRequest(login, password, response->GetCookies().c_str(), PPFT.c_str()));
}
bool CSkypeProto::CheckOauth(const char *szResponse)
@@ -103,20 +99,7 @@ void CSkypeProto::OnOAuthConfirm(MHttpResponse *response, AsyncHttpRequest *) return;
}
- std::regex regex("^(.+?=.*?;)");
- std::smatch match;
- CMStringA mscookies;
-
- for (auto &it : *response) {
- if (mir_strcmpi(it->szName, "Set-Cookie"))
- continue;
-
- content = it->szValue;
- if (std::regex_search(content, match, regex))
- mscookies.Append(match[1].str().c_str());
- }
-
- PushRequest(new OAuthRequest(mscookies.c_str(), PPFT.c_str(), opid.c_str()));
+ PushRequest(new OAuthRequest(response->GetCookies(), PPFT.c_str(), opid.c_str()));
}
void CSkypeProto::OnOAuthAuthorize(MHttpResponse *response, AsyncHttpRequest*)
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index 70f4bada85..584eff172e 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -177,7 +177,6 @@ public: private:
bool m_bHistorySynced;
- std::map<std::string, std::string> cookies;
static std::map<std::wstring, std::wstring> languages;
LIST<void> m_PopupClasses;
|