Mercurial > pidgin.yaz
diff libpurple/protocols/msn/nexus.h @ 23521:9fdf0accd4aa
Finally got MSN token updating working (I think).
So it seems after creating the signature, the xmlnode_to_str must have
added some xmlns attributes which were sent to the server. I thought that
CanonicalizationMethod stuff the XML specified meant the server would
normalize everything nicely, but apparently not.
I added the xmlns to the XML string before creating the signature and
it looks like things work now. It just needs a full 8-hour test to be
certain.
Did a bit of re-factoring to the token response parsing, as well. It
should now fail the first time something shows up that isn't expected,
or if something is missing, instead of blindly going forward with half
the tokens we requested.
References #4875.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 15 Jun 2008 06:22:25 +0000 |
parents | 1b98e2090a71 |
children | 711773577380 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/nexus.h Sat Jun 14 07:47:38 2008 +0000 +++ b/libpurple/protocols/msn/nexus.h Sun Jun 15 06:22:25 2008 +0000 @@ -42,14 +42,14 @@ #define SSO_POST_URL "/RST.srf" #define MSN_SSO_RST_TEMPLATE \ -"<wst:RequestSecurityToken Id=\"RST%d\">"\ +"<wst:RequestSecurityToken xmlns=\"http://schemas.xmlsoap.org/ws/2004/04/trust\" Id=\"RST%d\">"\ "<wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>"\ - "<wsp:AppliesTo>"\ - "<wsa:EndpointReference>"\ + "<wsp:AppliesTo xmlns=\"http://schemas.xmlsoap.org/ws/2002/12/policy\">"\ + "<wsa:EndpointReference xmlns=\"http://schemas.xmlsoap.org/ws/2004/03/addressing\">"\ "<wsa:Address>%s</wsa:Address>"\ "</wsa:EndpointReference>"\ "</wsp:AppliesTo>"\ - "<wsse:PolicyReference URI=\"%s\"></wsse:PolicyReference>"\ + "<wsse:PolicyReference xmlns=\"http://schemas.xmlsoap.org/ws/2003/06/secext\" URI=\"%s\"></wsse:PolicyReference>"\ "</wst:RequestSecurityToken>" #define MSN_SSO_TEMPLATE "<?xml version='1.0' encoding='utf-8'?>"\ @@ -107,7 +107,7 @@ #define MSN_SSO_AUTHINFO_SHA1_BASE64 "d2IeTF4DAkPEa/tVETHznsivEpc=" #define MSN_SSO_TIMESTAMP_TEMPLATE \ -"<wsu:Timestamp Id=\"Timestamp\">"\ +"<wsu:Timestamp xmlns=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" Id=\"Timestamp\">"\ "<wsu:Created>%s</wsu:Created>"\ "<wsu:Expires>%s</wsu:Expires>"\ "</wsu:Timestamp>" @@ -116,7 +116,7 @@ "<SignedInfo xmlns=\"http://www.w3.org/2000/09/xmldsig#\">"\ "<CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"></CanonicalizationMethod>"\ "<SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#hmac-sha1\"></SignatureMethod>"\ - "<Reference URI=\"#RST0\">"\ + "<Reference URI=\"#RST%d\">"\ "<Transforms>"\ "<Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"></Transform>"\ "</Transforms>"\