summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/SkypeWeb/src/skype_oauth.cpp21
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h1
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;