diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-01-11 11:28:27 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2023-01-12 20:22:41 +0000 |
commit | fc4b3cf771499b7f333ed7ec4779d0cfaa2c875a (patch) | |
tree | d67a018c97b3bc3f88a6edf93732e90b5c6754fa | |
parent | Update git submodules (diff) | |
download | core-fc4b3cf771499b7f333ed7ec4779d0cfaa2c875a.tar.gz core-fc4b3cf771499b7f333ed7ec4779d0cfaa2c875a.zip |
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.stahl@allotropia.de>
(cherry picked from commit e78859005b632860c9464335fdf6836c4fd41807)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145310
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | desktop/source/app/updater.cxx | 6 | ||||
-rw-r--r-- | extensions/source/update/check/download.cxx | 6 |
2 files changed, 6 insertions, 6 deletions
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 |