From a0d490df77bd12fcc1d645b10bb2f7855e971d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 4 Oct 2016 04:07:58 +0000 Subject: Facebook: Fix searching by id (now for real); version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@17349 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/process.cpp | 7 +++++-- protocols/FacebookRM/src/requests/profile.h | 2 -- protocols/FacebookRM/src/version.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'protocols') diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index d67fedddbf..5816cb66f3 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -1373,8 +1373,11 @@ void FacebookProto::SearchIdAckThread(void *targ) if (resp.code == HTTP_CODE_FOUND && resp.headers.find("Location") != resp.headers.end()) { search = utils::text::source_get_value(&resp.headers["Location"], 2, FACEBOOK_SERVER_MBASIC"/", "_rdr"); - HttpRequest *request = new ProfileRequest(facy.mbasicWorks, search.c_str()); - http::response resp = facy.sendRequest(request); + // Use only valid username redirects + if (search.find("home.php") == std::string::npos) { + HttpRequest *request = new ProfileRequest(facy.mbasicWorks, search.c_str()); + resp = facy.sendRequest(request); + } } if (resp.code == HTTP_CODE_OK) diff --git a/protocols/FacebookRM/src/requests/profile.h b/protocols/FacebookRM/src/requests/profile.h index 2eecbac018..8c84190c7a 100644 --- a/protocols/FacebookRM/src/requests/profile.h +++ b/protocols/FacebookRM/src/requests/profile.h @@ -73,8 +73,6 @@ public: ProfileRequest(bool mobileBasicWorks, const char *data) : HttpRequest(REQUEST_GET, FORMAT, "%s/%s", mobileBasicWorks ? FACEBOOK_SERVER_MBASIC : FACEBOOK_SERVER_MOBILE, data) { - flags |= NLHRF_REDIRECT; - Url << "v=info"; } diff --git a/protocols/FacebookRM/src/version.h b/protocols/FacebookRM/src/version.h index 9807421628..aa1507debd 100644 --- a/protocols/FacebookRM/src/version.h +++ b/protocols/FacebookRM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 3 #define __RELEASE_NUM 0 -#define __BUILD_NUM 0 +#define __BUILD_NUM 1 #include @@ -11,4 +11,4 @@ #define __AUTHOR "Michal Zelinka, Robert P\xf6" "sel" #define __AUTHOREMAIL "robyer@seznam.cz" #define __AUTHORWEB "http://miranda-ng.org/p/Facebook/" -#define __COPYRIGHT "© 2011-16 Robert P\xf6" "sel, 2009-11 Michal Zelinka" +#define __COPYRIGHT "� 2011-16 Robert P\xf6" "sel, 2009-11 Michal Zelinka" -- cgit v1.2.3