From 8c0cac9d9b9079e5a9d146634a2013ec543e6f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 23 Aug 2015 15:38:37 +0000 Subject: Facebook: Fix getting login error message git-svn-id: http://svn.miranda-ng.org/main/trunk@15021 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/communication.cpp | 31 +----------------------------- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 3b6407d3d2..2630f567c9 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -741,8 +741,6 @@ bool facebook_client::login(const char *username, const char *password) if (!cookies["datr"].empty()) parent->setString(FACEBOOK_KEY_DEVICE_ID, cookies["datr"].c_str()); - bool scanComputerRequest = false; - if (resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end()) { std::string location = resp.headers["Location"]; @@ -825,28 +823,6 @@ bool facebook_client::login(const char *username, const char *password) else if (resp.data.find("name=\"submit[Get%20Started]\"") != std::string::npos) { // Facebook things that computer was infected by malware and needs cleaning parent->debugLogA("!!! Facebook requires computer scan."); - scanComputerRequest = true; - - // Step 1: Get started - inner_data = "submit[Get%20Started]=Get%20Started"; - inner_data += "&nh=" + utils::text::source_get_value(&resp.data, 3, "name=\"nh\"", "value=\"", "\""); - 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); - - // Step 2: Download F-Secure Online Scanner (we're not really downloading anything) - inner_data = "submit[Download]=Download"; - inner_data += "&nh=" + utils::text::source_get_value(&resp.data, 3, "name=\"nh\"", "value=\"", "\""); - 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); - - // Step 3: Skip scanning and try to do Complete login - inner_data = "submit[Complete%20Login]=Complete%20Login"; - inner_data += "&nh=" + utils::text::source_get_value(&resp.data, 3, "name=\"nh\"", "value=\"", "\""); - 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); } } } @@ -871,15 +847,10 @@ bool facebook_client::login(const char *username, const char *password) return handle_error("login", FORCE_QUIT); } - if (scanComputerRequest) { - // FIXME: remove this message when someone confirm that it works... - client_notify(TranslateT("Facebook required computer cleaning and plugin correctly skipped it. Please report this to the plugin developer!")); - } - // Get and notify error message std::string error = utils::text::source_get_value(&resp.data, 4, "login_error_box", "", ""); if (error.empty()) - error = utils::text::source_get_value(&resp.data, 3, "", ""); loginError(parent, error); } -- cgit v1.2.3