summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-06-06 14:06:35 +0200
committerAndras Timar <andras.timar@collabora.com>2023-06-26 09:27:04 +0200
commit766e051f5069b925b0ac2e86043b475eda6db24a (patch)
tree5fdd79b570e77c2d7fb2b5a0161aa933ada16dd7 /ucb
parent2748f9c1a2e35c6c23caccdd27369ffb8561e03b (diff)
ucb: webdav-curl: auth data is invalid when receiving 401
Even if it used to be valid before; unfortunately newly entered credentials weren't actually used because the flag was never reset. Change-Id: Ib36689f40ff780596b9cfe6fe589a6f2e79cfcd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152679 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 7efdacc1cd529e1801c9adf803a1a2db8334e67a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152658 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index dcf71a8869b3..98be7579a423 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1397,6 +1397,10 @@ auto CurlProcessor::ProcessRequest(
case SC_UNAUTHORIZED:
case SC_PROXY_AUTHENTICATION_REQUIRED:
{
+ (statusCode != SC_PROXY_AUTHENTICATION_REQUIRED
+ ? rSession.m_isAuthenticated
+ : rSession.m_isAuthenticatedProxy)
+ = false; // any auth data in m_pCurl is invalid
auto& rnAuthRequests(statusCode == SC_UNAUTHORIZED ? nAuthRequests
: nAuthRequestsProxy);
if (rnAuthRequests == 10)