summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2017-06-13 22:23:51 +0300
committerKirill Volinsky <mataes2007@gmail.com>2017-06-13 22:23:51 +0300
commit504c960c9d9e7972405fed9482938330f7394dd0 (patch)
tree8739cd76be94f173cb132d9a82ba1a53f767df0d /protocols/SkypeWeb/src
parent9bd700bc335fb2b5864fdbdcda14862188d13ddb (diff)
SkypeWeb: more correct version of 9bd700b but for "ipt" name also not working
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r--protocols/SkypeWeb/src/skype_oauth.cpp11
1 files changed, 6 insertions, 5 deletions
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 = "<input type=\"hidden\" name=\"(.+?)\" id=\"(.+?)\" value=\"(.+?)\">";
- if (!std::regex_search(content, match, regex)) {
+ regex = "<input type=\"hidden\" name=\"t\" id=\"t\" value=\"(.+?)\">";
+ regex2 = "<input type=\"hidden\" name=\"ipt\" id=\"ipt\" value=\"(.+?)\">";
+ 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)