ucb/source/ucp/webdav-curl/CurlSession.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 388a702af2fe45b2c436e64eb8639f16c1e24b76
Author:     Michael Stahl <[email protected]>
AuthorDate: Tue Oct 18 18:35:35 2022 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Tue Oct 18 18:36:25 2022 +0200

    ucb: webdav-curl: add magic header to disable FBA in 403 fallback
    
    Change-Id: I0018a9904857d7521895936dc27607a54523f300

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 5d0616e2e1b9..eda577ef722f 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1404,6 +1404,13 @@ auto CurlProcessor::ProcessRequest(
                             }
                         }
                         SAL_INFO("ucb.ucp.webdav.curl", "403 fallback 
authentication hack");
+                        // disable 302 redirect
+                        pRequestHeaderList.reset(curl_slist_append(
+                            pRequestHeaderList.release(), 
"X-FORMS_BASED_AUTH_ACCEPTED: f"));
+                        if (!pRequestHeaderList)
+                        {
+                            throw uno::RuntimeException("curl_slist_append 
failed");
+                        }
                     }
                         [[fallthrough]]; // SP, no cookie, or cookie failed: 
try NTLM
                     case SC_UNAUTHORIZED:

Reply via email to