summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-09-07 15:01:48 +0000
committerRobert Pösel <robyer@seznam.cz>2014-09-07 15:01:48 +0000
commitc03e34d73e955f6adcb2bcd40d5f524083d210c3 (patch)
tree8ec00ce40c67471146e3129dbb81517a1c6088ca /protocols/FacebookRM
parentd267c7e3f3462693a6264029308e239de115eda5 (diff)
Facebook: Better handling of identity confirmation
git-svn-id: http://svn.miranda-ng.org/main/trunk@10393 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r--protocols/FacebookRM/src/communication.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index bb64c65634..70d0bd0c59 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -833,6 +833,14 @@ bool facebook_client::login(const char *username, const char *password)
inner_data += "&fb_dtsg=" + utils::url::encode(utils::text::source_get_value(&resp.data, 3, "name=\"fb_dtsg\"", "value=\"", "\""));
resp = flap(REQUEST_SETUP_MACHINE, &inner_data);
+ // In this step might be needed identity confirmation
+ if (resp.data.find("name=\"birthday_captcha_") != std::string::npos) {
+ // Account is locked and needs identity confirmation
+ client_notify(TranslateT("Login error: Your account is temporarily locked. You need to confirm this device from web browser."));
+ parent->debugLogA(" ! ! Login error: Birthday confirmation.");
+ return handle_error("login", FORCE_QUIT);
+ }
+
// 2) Approve last unknown login
// inner_data = "submit[I%20don't%20recognize]=I%20don't%20recognize"; // Don't recognize - this will force to change account password
inner_data = "submit[This%20is%20Okay]=This%20is%20Okay"; // Recognize
@@ -892,7 +900,7 @@ bool facebook_client::login(const char *username, const char *password)
{
// Check whether captcha code is required
if (resp.data.find("id=\"captcha\"") != std::string::npos) {
- client_notify(TranslateT("Login error: Captcha code is required. Bad login credentials?"));
+ client_notify(TranslateT("Login error: Captcha code is required. You need to confirm this device from web browser."));
parent->debugLogA(" ! ! Login error: Captcha code is required.");
return handle_error("login", FORCE_QUIT);
}