desktop/source/app/updater.cxx              |    6 +++---
 extensions/source/update/check/download.cxx |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit fc4b3cf771499b7f333ed7ec4779d0cfaa2c875a
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Wed Jan 11 11:28:27 2023 +0100
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Thu Jan 12 20:22:41 2023 +0000

    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 <michael.st...@allotropia.de>
    (cherry picked from commit e78859005b632860c9464335fdf6836c4fd41807)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145310
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

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;
diff --git a/extensions/source/update/check/download.cxx 
b/extensions/source/update/check/download.cxx
index 4ba5863930ba..ba371bdee570 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -232,11 +232,11 @@ static bool curl_run(std::u16string_view rURL, OutData& 
out, const OString& aPro
 
         // enable redirection
         (void)curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1);
-        // 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(pCURL, CURLOPT_REDIR_PROTOCOLS_STR, "http,https");
+    curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS_STR, "https");
 #else
-    curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | 
CURLPROTO_HTTPS);
+    curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS);
 #endif
 
         // write function

Reply via email to