summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-10-18 18:35:35 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-10-18 18:36:25 +0200
commit388a702af2fe45b2c436e64eb8639f16c1e24b76 (patch)
treea62bea54dfba96c65fc5be92a879719dfccaa4d3 /ucb
parent870748f9c92fb0df4e643e327a996e6189af3346 (diff)
ucb: webdav-curl: add magic header to disable FBA in 403 fallback
Change-Id: I0018a9904857d7521895936dc27607a54523f300
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.cxx7
1 files changed, 7 insertions, 0 deletions
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: