summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 347eb25789e7..ca6f93744c7b 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1207,11 +1207,18 @@ auto CurlProcessor::ProcessRequest(
::std::optional<Auth> oAuthProxy;
if (pEnv && !rSession.m_isAuthenticatedProxy && !rSession.m_Proxy.aName.isEmpty())
{
- // the hope is that this must be a URI
- CurlUri const uri(rSession.m_Proxy.aName);
- if (!uri.GetUser().isEmpty() || !uri.GetPassword().isEmpty())
+ try
+ {
+ // the hope is that this must be a URI
+ CurlUri const uri(rSession.m_Proxy.aName);
+ if (!uri.GetUser().isEmpty() || !uri.GetPassword().isEmpty())
+ {
+ oAuthProxy.emplace(uri.GetUser(), uri.GetPassword(), CURLAUTH_ANY);
+ }
+ }
+ catch (DAVException&)
{
- oAuthProxy.emplace(uri.GetUser(), uri.GetPassword(), CURLAUTH_ANY);
+ // ignore any parsing failure here
}
}
decltype(CURLAUTH_ANY) const authSystem(CURLAUTH_NEGOTIATE | CURLAUTH_NTLM | CURLAUTH_NTLM_WB);