From 5ece45192b6b77a5a746cc5404fbe8bcef0c909a Mon Sep 17 00:00:00 2001 From: Piotr Piastucki Date: Sat, 16 May 2015 22:18:04 +0000 Subject: 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 --- protocols/MSN/src/msn_auth.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'protocols/MSN') 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; + } } } } -- cgit v1.2.3