From 504c960c9d9e7972405fed9482938330f7394dd0 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 13 Jun 2017 22:23:51 +0300 Subject: SkypeWeb: more correct version of 9bd700b but for "ipt" name also not working --- protocols/SkypeWeb/src/skype_oauth.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_oauth.cpp') diff --git a/protocols/SkypeWeb/src/skype_oauth.cpp b/protocols/SkypeWeb/src/skype_oauth.cpp index 1d82cac793..b68aa85442 100644 --- a/protocols/SkypeWeb/src/skype_oauth.cpp +++ b/protocols/SkypeWeb/src/skype_oauth.cpp @@ -64,19 +64,20 @@ void CSkypeProto::OnOAuthAuthorize(const NETLIBHTTPREQUEST *response) return; } - std::regex regex; + std::regex regex, regex2; std::smatch match; std::string content = response->pData; - regex = ""; - if (!std::regex_search(content, match, regex)) { + regex = ""; + regex2 = ""; + if (!(std::regex_search(content, match, regex) || std::regex_search(content, match, regex2))) { ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGIN_ERROR_UNKNOWN); SetStatus(ID_STATUS_OFFLINE); return; } - std::string t = match[3]; + std::string t = match[1]; - PushRequest(new OAuthRequest(t.c_str()), &CSkypeProto::OnOAuthEnd); + PushRequest(new OAuthRequest(t.c_str(), 0), &CSkypeProto::OnOAuthEnd); } void CSkypeProto::OnOAuthEnd(const NETLIBHTTPREQUEST *response) -- cgit v1.2.3