aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-10-14 13:28:52 -0300
committerdequis <dx@dxzone.com.ar>2015-10-14 13:28:52 -0300
commit12442edb26967cbd60fc95de1cf6846ca3e4d64d (patch)
treefff88e7b3e8d4e784faed3a8a2f8c28fe49adff5
parent0b1ae595647712ecd9f69a74f210d58f570e74b9 (diff)
msn: Better error messages on 'location blocked'
This is what the 'howtofixmsn' wiki page addressed, which has a very generic name because it's one of the first msn issues that appeared when we thought it was dying. Since it's just a security measure, it still appears when people log in from unusual locations.
-rw-r--r--protocols/msn/soap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c
index 7d1bed1f..34515aec 100644
--- a/protocols/msn/soap.c
+++ b/protocols/msn/soap.c
@@ -326,6 +326,7 @@ static xt_status msn_soap_passport_failure(struct xt_node *node, gpointer data)
struct msn_soap_passport_sso_data *sd = soap_req->data;
struct xt_node *code = xt_find_node(node->children, "faultcode");
struct xt_node *string = xt_find_node(node->children, "faultstring");
+ struct xt_node *reqstatus = xt_find_path(node, "psf:pp/psf:reqstatus");
struct xt_node *url;
if (code == NULL || code->text_len == 0) {
@@ -334,6 +335,9 @@ static xt_status msn_soap_passport_failure(struct xt_node *node, gpointer data)
(url = xt_find_node(node->children, "psf:redirectUrl")) &&
url->text_len > 0) {
sd->redirect = g_strdup(url->text);
+ } else if (reqstatus && strcmp(reqstatus->text, "0x800488fe") == 0) {
+ char *msg = "Location blocked. Log in to live.com, go to recent activity and click 'this was me'";
+ sd->error = g_strdup_printf("%s (%s)", code->text, msg);
} else {
sd->error = g_strdup_printf("%s (%s)", code->text, string && string->text_len ?
string->text : "no description available");
@@ -345,6 +349,7 @@ static xt_status msn_soap_passport_failure(struct xt_node *node, gpointer data)
static const struct xt_handler_entry msn_soap_passport_sso_parser[] = {
{ "wsse:BinarySecurityToken", "wst:RequestedSecurityToken", msn_soap_passport_sso_token },
{ "S:Fault", "S:Envelope", msn_soap_passport_failure },
+ { "S:Fault", "wst:RequestSecurityTokenResponse", msn_soap_passport_failure },
{ NULL, NULL, NULL }
};