diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-04-20 13:16:31 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-04-22 15:49:25 +0200 |
commit | 5aac97f46dcea3704705eaf9b45a88be6b553e28 (patch) | |
tree | dc22e28de07b99e7a93dd71f347000b5a0be7ff4 /ucb | |
parent | 6449174f8fd648952ed6b27a1fbe42ef060bdcf8 (diff) |
tdf#146460 tdf#148429 ucb: webdav-curl: censor "curl" in UserAgent
This is now the second bug filed because a server replies with 403 if
the UserAgent contains the string "curl".
Change-Id: I25ca2d255af76a7ff4e64dad900b1bf0b78de59f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133212
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 8d9c56e8f42428fd6695942c673bffb985d22ad5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133146
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 3fe6a03426a86ec6b18a9b712588619f19a72897)
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-curl/CurlSession.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx index dbc2e45cd3eb..1c0201cd7680 100644 --- a/ucb/source/ucp/webdav-curl/CurlSession.cxx +++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx @@ -619,7 +619,7 @@ CurlSession::CurlSession(uno::Reference<uno::XComponentContext> const& xContext, // en.wikipedia.org:80 forces back 403 "Scripts should use an informative // User-Agent string with contact information, or they may be IP-blocked // without notice" otherwise: - OString const useragent(OString("LibreOffice " LIBO_VERSION_DOTTED " curl/") + OString const useragent(OString("LibreOffice " LIBO_VERSION_DOTTED " denylistedbackend/") + OString(pVersion->version, strlen(pVersion->version)) + " " + pVersion->ssl_version); // looks like an explicit "User-Agent" header in CURLOPT_HTTPHEADER |