From e78859005b632860c9464335fdf6836c4fd41807 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 11 Jan 2023 11:28:27 +0100 Subject: Curl:CURLOPT_REDIR_PROTOCOLS(_STR): use only "https", not "http" Change-Id: If615503b598f6823d7978f12e666832c82b63ece Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145334 Tested-by: Jenkins Reviewed-by: Michael Stahl --- desktop/source/app/updater.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop') diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index f74dfbeceb6e..5fb18dfad0bf 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -562,11 +562,11 @@ std::string download_content(const OString& rURL, bool bFile, OUString& rHash) headerlist = curl_slist_append(headerlist, buf); curl_easy_setopt(curl.get(), CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1); // follow redirects - // only allow redirect to http:// and https:// + // only allow redirect to https:// #if (LIBCURL_VERSION_MAJOR > 7) || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 85) - curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS_STR, "http,https"); + curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS_STR, "https"); #else - curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS); #endif std::string response_body; -- cgit