From 6ca97b5db81aa6442091ecededcc8667e08d4696 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 27 Feb 2017 19:39:18 +0100 Subject: [PATCH] Resolves: rhbz#1410197 work around infinite redirection loop --- ...197-limit-the-number-of-redirections.patch | 25 +++++++++++++++++++ libcmis.spec | 6 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0001-rhbz-1410197-limit-the-number-of-redirections.patch diff --git a/0001-rhbz-1410197-limit-the-number-of-redirections.patch b/0001-rhbz-1410197-limit-the-number-of-redirections.patch new file mode 100644 index 0000000..b7d082d --- /dev/null +++ b/0001-rhbz-1410197-limit-the-number-of-redirections.patch @@ -0,0 +1,25 @@ +From 3637a6bbf0a3daf8c11d4290ea47523e3ebeb496 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 27 Feb 2017 19:33:45 +0100 +Subject: [PATCH] rhbz#1410197 limit the number of redirections + +--- + src/libcmis/http-session.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libcmis/http-session.cxx b/src/libcmis/http-session.cxx +index 943ed5b..5c2f5e9 100644 +--- a/src/libcmis/http-session.cxx ++++ b/src/libcmis/http-session.cxx +@@ -396,6 +396,8 @@ libcmis::HttpResponsePtr HttpSession::httpPostRequest( const string& url, istrea + curl_easy_setopt( m_curlHandle, CURLOPT_HEADERFUNCTION, &lcl_getHeaders ); + curl_easy_setopt( m_curlHandle, CURLOPT_WRITEHEADER, response.get() ); + ++ curl_easy_setopt( m_curlHandle, CURLOPT_MAXREDIRS, 20); ++ + // Get the stream length + is.seekg( 0, ios::end ); + long size = is.tellg( ); +-- +2.9.3 + diff --git a/libcmis.spec b/libcmis.spec index 49c63a3..8a6f46c 100644 --- a/libcmis.spec +++ b/libcmis.spec @@ -2,7 +2,7 @@ Name: libcmis Version: 0.5.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A C++ client library for CM interfaces License: GPLv2+ or LGPLv2+ or MPLv1.1 @@ -23,6 +23,7 @@ Patch2: 0003-Fix-test-in-test-factory.patch Patch3: 0004-Fix-test-in-test-gdrive.patch Patch4: 0005-Fix-test-in-test-onedrive.patch Patch5: 0001-update-boost.m4-to-fix-version-detection-with-gcc-6..patch +Patch6: 0001-rhbz-1410197-limit-the-number-of-redirections.patch %description LibCMIS is a C++ client library for working with CM (content management) @@ -92,6 +93,9 @@ make %{?_smp_mflags} check %{_mandir}/man1/cmis-client.1* %changelog +* Mon Feb 27 2017 David Tardon - 0.5.1-5 +- Resolves: rhbz#1410197 work around infinite redirection loop + * Fri Feb 10 2017 Fedora Release Engineering - 0.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild