summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_auth.cpp
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-05-16 22:18:04 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-05-16 22:18:04 +0000
commit5ece45192b6b77a5a746cc5404fbe8bcef0c909a (patch)
tree88914072aed3af4cda17e64f3515bdb48175b560 /protocols/MSN/src/msn_auth.cpp
parentb5c08ff62968cf49c19dcdd2347520e400cbb5f5 (diff)
On M$ account login problem (i.e. due to security measures), open up browser window to let user correct the problem (untested).
git-svn-id: http://svn.miranda-ng.org/main/trunk@13659 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_auth.cpp')
-rw-r--r--protocols/MSN/src/msn_auth.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp
index 40a3db09b5..43ad0ee348 100644
--- a/protocols/MSN/src/msn_auth.cpp
+++ b/protocols/MSN/src/msn_auth.cpp
@@ -870,7 +870,15 @@ int CMsnProto::MSN_AuthOAuth(void)
} else hHttpsConnection = NULL;
}
}
- } else hHttpsConnection = NULL;
+ } else {
+ /* There may be a problem with login, i.e. M$ security measures. Open up browser
+ * window with same URL in order to let user correct this */
+ if (nlhrReply->resultCode == 200 && nlhrReply->pData && strstr(nlhrReply->pData, "ar/cancel")) {
+ url.Format("https://login.live.com/oauth20_authorize.srf?%s", pszPostParams);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)url.GetString());
+ }
+ hHttpsConnection = NULL;
+ }
}
}
}