From dab6bd937e2b0f93ee3fcd7c2923334e31a7efeb Mon Sep 17 00:00:00 2001 From: Sude Date: Sat, 16 Mar 2013 21:48:52 +0200 Subject: [PATCH] allow only 1 redirect when POSTing login info --- src/downloader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/downloader.cpp b/src/downloader.cpp index 5fd6a57..1411052 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -957,10 +957,12 @@ int Downloader::HTTP_Login(const std::string& email, const std::string& password curl_easy_setopt(curlhandle, CURLOPT_POSTFIELDS, postdata.c_str()); curl_easy_setopt(curlhandle, CURLOPT_WRITEDATA, &memory); curl_easy_setopt(curlhandle, CURLOPT_NOPROGRESS, 1); + curl_easy_setopt(curlhandle, CURLOPT_MAXREDIRS, 1); curl_easy_setopt(curlhandle, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL); curl_easy_perform(curlhandle); memory.str(std::string()); curl_easy_setopt(curlhandle, CURLOPT_HTTPGET, 1); + curl_easy_setopt(curlhandle, CURLOPT_MAXREDIRS, -1); json = this->getResponse("http://www.gog.com/user/ajax/?a=get"); parsingSuccessful = jsonparser->parse(json, root);