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 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'protocols/FacebookRM/src/process.cpp') 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) -- cgit v1.2.3