diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2017-06-13 22:23:51 +0300 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2017-06-13 22:23:51 +0300 |
commit | 504c960c9d9e7972405fed9482938330f7394dd0 (patch) | |
tree | 8739cd76be94f173cb132d9a82ba1a53f767df0d | |
parent | 9bd700bc335fb2b5864fdbdcda14862188d13ddb (diff) |
SkypeWeb: more correct version of 9bd700b but for "ipt" name also not working
-rw-r--r-- | protocols/SkypeWeb/src/skype_oauth.cpp | 11 |
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) |