summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-05-14 17:49:05 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-05-14 17:49:05 +0000
commitf9475db573dcf34f9b8ea8180b69c834978f6ac9 (patch)
tree6c79c2d3a7572f65fd80e0c46c3c9973944873be /protocols
parentc7577005f0d52def37928a96b66b72755e559a97 (diff)
Fixed web authentication method without SkyLib.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13592 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/MSN/src/msn_auth.cpp6
-rw-r--r--protocols/MSN/src/msn_commands.cpp30
2 files changed, 26 insertions, 10 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index c91be0edb1..cfb1e5291a 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -670,6 +670,10 @@ void CMsnProto::LoadAuthTokensDB(void)
replaceStr(authCookies, dbv.pszVal);
db_free(&dbv);
}
+ if (getString("authStrToken", &dbv) == 0) {
+ replaceStr(authStrToken, dbv.pszVal);
+ db_free(&dbv);
+ }
}
void CMsnProto::SaveAuthTokensDB(void)
@@ -681,6 +685,7 @@ void CMsnProto::SaveAuthTokensDB(void)
setString("authContactToken", authContactToken);
setString("authUIC", authUIC);
setString("authCookies", authCookies);
+ setString("authStrToken", authStrToken);
}
// -1 - Error on login sequence
@@ -852,6 +857,7 @@ int CMsnProto::MSN_AuthOAuth(void)
pMappingContainer+=20;
UrlDecode(pMappingContainer);
replaceStr(authUIC, pMappingContainer);
+ MSN_GetPassportAuth();
authMethod = retVal = 2;
} else retVal = 0;
} else retVal = 0;
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 3c45f5d98d..6b9d3e3b2d 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -1367,24 +1367,34 @@ LBL_InvalidCommand:
if (GetMyNetID()!=NETID_SKYPE) {
/* MSN account login */
- char *pszSite = "";
switch (MSN_AuthOAuth())
{
- case 1: break;
- case 2: pszSite = "<ssl-site-name>chatservice.live.com</ssl-site-name>"; break;
+ case 1:
+ info->sendPacketPayload("ATH", "CON\\USER",
+ "<user><ssl-compact-ticket>t=%s</ssl-compact-ticket>"
+ "<uic>%s</uic>"
+ "<id>%s</id><alias>%s</alias></user>\r\n",
+ authSSLToken ? ptrA(HtmlEncode(authSSLToken)) : "",
+ authUIC,
+ GetMyUsername(NETID_MSN), GetMyUsername(NETID_SKYPE));
+ break;
+
+ case 2:
+ info->sendPacketPayload("ATH", "CON\\USER",
+ "<user><ssl-compact-ticket>%s</ssl-compact-ticket>"
+ "<uic>%s</uic>"
+ "<ssl-site-name>chatservice.live.com</ssl-site-name>"
+ "</user>\r\n",
+ authStrToken ? ptrA(HtmlEncode(authStrToken)) : "",
+ authUIC);
+ break;
+
default:
m_iDesiredStatus = ID_STATUS_OFFLINE;
return 1;
}
- info->sendPacketPayload("ATH", "CON\\USER",
- "<user><ssl-compact-ticket>t=%s</ssl-compact-ticket>"
- "<uic>%s</uic>%s"
- "<id>%s</id><alias>%s</alias></user>\r\n",
- authSSLToken ? ptrA(HtmlEncode(authSSLToken)) : "",
- authUIC, pszSite,
- GetMyUsername(NETID_MSN), GetMyUsername(NETID_SKYPE));
} else {
/* Skype username/pass login */
ezxml_t xmlcnt = ezxml_parse_str(msgBody, strlen(msgBody));