diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-10-01 23:56:33 -0700 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-10-01 23:56:33 -0700 | 
| commit | 2af3e232ff468b288dd4e0dbdab1a17312d801c5 (patch) | |
| tree | 2223aaf2f9fe8f939866db72a25378ffd854ccb4 /protocols | |
| parent | 62f53b508742804d5df6533150f17d41e6afcbb2 (diff) | |
Restore MSN password truncation code. MSN still can't handle passwords
longer than 16 chars and silently fails if you give >16chars.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/msn/soap.c | 4 | ||||
| -rw-r--r-- | protocols/msn/soap.h | 1 | 
2 files changed, 4 insertions, 1 deletions
| diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index a1b5be76..909f6ad9 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -269,6 +269,7 @@ static int msn_soap_passport_sso_build_request( struct msn_soap_req_data *soap_r  	struct msn_soap_passport_sso_data *sd = soap_req->data;  	struct im_connection *ic = soap_req->ic;  	struct msn_data *md = ic->proto_data; +	char pass[MAX_PASSPORT_PWLEN+1];  	if( sd->redirect )  	{ @@ -280,8 +281,9 @@ static int msn_soap_passport_sso_build_request( struct msn_soap_req_data *soap_r  	else  		soap_req->url = g_strdup( SOAP_PASSPORT_SSO_URL ); +	strncpy( pass, ic->acc->pass, MAX_PASSPORT_PWLEN );  	soap_req->payload = g_markup_printf_escaped( SOAP_PASSPORT_SSO_PAYLOAD, -		ic->acc->user, ic->acc->pass, md->pp_policy ); +		ic->acc->user, pass, md->pp_policy );  	return MSN_SOAP_OK;  } diff --git a/protocols/msn/soap.h b/protocols/msn/soap.h index f49c86c4..fccdebc6 100644 --- a/protocols/msn/soap.h +++ b/protocols/msn/soap.h @@ -62,6 +62,7 @@ int msn_soapq_flush( struct im_connection *ic, gboolean resend );  #define SOAP_PASSPORT_SSO_URL "https://login.live.com/RST.srf"  #define SOAP_PASSPORT_SSO_URL_MSN "https://msnia.login.live.com/pp800/RST.srf" +#define MAX_PASSPORT_PWLEN 16  #define SOAP_PASSPORT_SSO_PAYLOAD \  "<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\" " \ | 
