external/libcmis/UnpackedTarball_libcmis.mk | 1 + external/libcmis/sharepoint-auth.patch.1 | 13 +++++++++++++ 2 files changed, 14 insertions(+)
New commits: commit d2d973950bf35aa07251c77fae5b7283b4c91ea3 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Jun 20 18:11:57 2024 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Jun 21 11:36:33 2024 +0200 libcmis: improve Sharepoint authentication Sharepoint 16 apparently won't authenticate with NTLM unless the header "X-FORMS_BASED_AUTH_ACCEPTED: f" is sent. Change-Id: I13fe658a1fc5a18c22a49488dd634cbc07607aef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169306 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins diff --git a/external/libcmis/UnpackedTarball_libcmis.mk b/external/libcmis/UnpackedTarball_libcmis.mk index 4a0a1a5e9e03..ede32bc8fad3 100644 --- a/external/libcmis/UnpackedTarball_libcmis.mk +++ b/external/libcmis/UnpackedTarball_libcmis.mk @@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libcmis,\ external/libcmis/0001-Fix-warning-C4589-when-building-with-MSVC.patch \ external/libcmis/http-session-cleanup.patch.1 \ external/libcmis/factory-no-retry-ssl.patch.1 \ + external/libcmis/sharepoint-auth.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libcmis/sharepoint-auth.patch.1 b/external/libcmis/sharepoint-auth.patch.1 new file mode 100644 index 000000000000..ff01c1291787 --- /dev/null +++ b/external/libcmis/sharepoint-auth.patch.1 @@ -0,0 +1,13 @@ +--- libcmis/src/libcmis/sharepoint-session.cxx.orig 2024-06-20 18:02:12.751118095 +0200 ++++ libcmis/src/libcmis/sharepoint-session.cxx 2024-06-20 18:04:36.467083223 +0200 +@@ -207,6 +207,10 @@ + + headers_slist.reset(curl_slist_append(headers_slist.release(), "accept:application/json; odata=verbose")); + headers_slist.reset(curl_slist_append(headers_slist.release(), ("x-requestdigest:" + m_digestCode).c_str())); ++ // newer Sharepoint requires this; this can be detected based on header ++ // "x-msdavext_error" starting with "917656;" typically with a 403 status ++ // but since this class is specifically for SharePoint just add it always ++ headers_slist.reset(curl_slist_append(headers_slist.release(), "X-FORMS_BASED_AUTH_ACCEPTED: f")); + + if ( !getUsername().empty() && !getPassword().empty() ) + {