summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)Author
2021-11-26ucb: webdav-curl: don't use chunked encoding for PROPPATCHMichael Stahl
Sharepoint 16 has the same problem with this as with PROPFIND. But this still doesn't work, trying to add dead properties results in HTTP/1.1 400 BAD REQUEST now. In fact, it has additional problems: request 3 properties Foo, Bar, Baz with one PROPFIND and it complains about Foo, FooBar, FooBarBaz... Change-Id: Ia0ce0f7b9422e0751839151a4c964f0437282c64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125907 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26cid#1494447 ucb: webdav-curl: Logically dead codeMichael Stahl
Change-Id: I98a99ddc287fd83ff95e9a1b3851a9888dd6ef5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125864 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-26ucb: webdav-curl: remove useless assert in getLockTokenForURI()Michael Stahl
Change-Id: Ia27acf55bd7baf70c0b57e0922a62b1d9680c5b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125848 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26ucb: webdav-curl: don't use chunked encoding for LOCKMichael Stahl
Sharepoint 16 produces exactly the same error HTML as for PROPFIND. Change-Id: Idd3862456c4efbb9eb0533298dcd93711b30faae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125847 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26ucb: webdav-curl: avoid pointless HEAD requests for DAV resourcesMichael Stahl
Content::getPropertyValues() has a funny conditional which was changed in commit a86bc34ddcff6b04bb9fdb8c960bbf2c49540da1 "Resolves: #i121922# Fix wrong condition". But the new condition also appears wrong, there is no need to do any further requests if all properties have already been retrieved, so the check for m_bDidGetOrHead could just be omitted. There is a surprising result in the Remote Files dialog when connecting to a Sharepoint 16 server: all properties have been retrieved from the directory given as Root, but because of !m_bDidGetOrHead the branch is taken anyway. The HEAD request results in a "HTTP/1.1 302 Redirect" to $ROOT/Forms/AllItems.aspx, HEAD on this URL gives a "HTTP/1.1 200 OK" and then subsequently a PROPFIND on that very same URL results in "HTTP/1.1 404 NOT FOUND". Physics claims that a single observation should be sufficient to determine whether an URL exists or not, but Sharepoint is apparently able to maintain this quantum superposition indefinitely, hence the Remote Files dialog doesn't display anything as the 404 causes an exception. Try to fix this by requiring a missing property again before initiating the HEAD request for DAV resources. Change-Id: I1239762948b6abd1f8fc097edd4a16cb6b75ca7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125826 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26ucb: webdav-curl: don't use chunked encoding for PROPFINDMichael Stahl
Sharepoint 16 responds to PROPFIND with "Transfer-Encoding: chunked" with "HTTP/1.1 200 OK" and this body: <HTML><DIV dir="ltr"><H2>Microsoft SharePoint Foundation Error.</H2>\n\n<P>\n<B>User:</B> please report details to this Web site's Webmaster.\n<P>\n\n<P>\n<B>Webmaster:</B> please see the server's application event log for more details.\n</P></DIV> Understandably, WebDAVResponseParser barfs on this: ucb/source/ucp/webdav-curl/webdavresponseparser.cxx:405: Parser destructed with existing content (!) ucb/source/ucp/webdav-curl/webdavresponseparser.cxx:942: WebDAV Parse error (!) Apparently setting Content-Length works better. Change-Id: If3eae8c2f8b9f1e1bb4ed4fc67a79a682d7d0050 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125825 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26cid#1494446 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ib8e1d0e691772e822f81afafbd47ba33698b592e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125863 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Caolán McNamara <caolanm@redhat.com>
2021-11-26Removed break; after returnAndrea Gelmini
Change-Id: I14e12fee4b86ba2fadeefddef5de086e85d4bb95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125729 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-11-25ucb: webdav-curl: NTLM is both system and not-system authenticationMichael Stahl
Leave it to libcurl collapse the wave function. Change-Id: Idb51ebaec8b68a7c7fadcae2ae13b3b63ba1db79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125788 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-25ucb: webdav-curl: Sharepoint returns redirect urls that curl can't parseMichael Stahl
Encode them just like in WebDAVResponseParser. Change-Id: I7f0ee1d42df356fdd585d1f6e0f39e4094701a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125787 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-24Remove break; after returnAndrea Gelmini
Change-Id: I0690bcf0740842abde7268d99ab791163262945f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125766 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-24ucb: webdav-curl: properly reset CURLOPT_INFILESIZE_LARGEMichael Stahl
If the value is set to 0, then the next PROPFIND after PUT will not append the "Expect: 100-continue" header, and hang without uploading. See Curl_http_bodysend() which checks for != 0. Unfortunately with different default values for "long" and "curl_off_t" CurlOption becomes a little more complicated. (regression from 8e34fe50412fd58a600ba1b8238b80444aec02e5) Change-Id: I55ea02659f7a64f373e89a6d02d6865c158fd0c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125742 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23tdf#145769 ucb: webdav-curl: stop returning IsDocument=true if it doesn't existMichael Stahl
Content::getPropertyValues() has no less than 2 fallbacks that cause it to return property values IsDocument=true and IsFolder=false in case there is an authentication failure or server connection failure. Change-Id: Iddcda6420c517f522d98e58b12a7e19247ff2d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125667 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-23ucb: webdav-curl: fix some issues caused by missing authenticationMichael Stahl
* DAV_HTTP_NOAUTH wasn't actually handled anywhere; treat it the same as DAV_HTTP_AUTH for now * Content::getResourceType() would just determine that the server doesn't support DAV if there is any authentication missing * Content::getResourceOptions() would cache authentication error that is caused by executing the command without any XCommandEnvironment and therefore no XInteractionHandler Change-Id: Ie319a505da4b0f6bde01d6611262b8b1dad33d2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125665 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-22ucb: webdav-curl: don't use chunked encoding for PUTMichael Stahl
What happens with Nextcloud: CURLINFO_HEADER_OUT: 0xa028408: PUT .../testB.odt HTTP/1.1 User-Agent: LibreOffice 7.3.0.0 curl/7.79.1 NSS/3.71 Accept: */* Accept-Encoding: deflate, gzip Transfer-Encoding: chunked Expect: 100-continue debug log: 0xa028408: STATE: DO => DID handle 0xa028408; line 2077 (connection #0) debug log: 0xa028408: STATE: DID => PERFORMING handle 0xa028408; line 2196 (connection #0) debug log: 0xa028408: HTTP 1.1 or later with persistent connection CURLINFO_HEADER_IN: 0xa028408: HTTP/1.1 100 Continue debug log: 0xa028408: CURLINFO_DATA_OUT 8357 debug log: 0xa028408: Signaling end of chunked upload via terminating chunk. debug log: 0xa028408: CURLINFO_DATA_OUT 5 debug log: 0xa028408: Mark bundle as not supporting multiuse debug log: 0xa028408: HTTP 1.1 or later with persistent connection CURLINFO_HEADER_IN: 0xa028408: HTTP/1.1 201 Created CURLINFO_HEADER_IN: 0xa028408: Date: Fri, 19 Nov 2021 16:27:47 GMT CURLINFO_HEADER_IN: 0xa028408: Server: Apache CURLINFO_HEADER_IN: 0xa028408: Content-Length: 0 ... yes, "201 Created" a 0 byte file. https://github.com/nextcloud/server/issues/7995 Apparently this doesn't happen with header Content-Length: 8347 Change-Id: I3f38d50530a8b6430b27de2525370e1d95705da6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125579 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-22ucb: webdav-curl: log headers in debug_callbackMichael Stahl
Change-Id: I40ed170c2ae8bc769372fa2269dcf1f1643000de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125580 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-22Revert "The CurlOption curl_off_t case appears to be unused"Michael Stahl
This reverts commit 20168b1f09b4d2aa8643dc7d4a16d8a1dd1008a6. Change-Id: I3ac7bdeece94ec2a0e01d67f2788874b3f286fe4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125578 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-18ucb: webdav-curl: don't assert on valid URLMichael Stahl
If you put an URL into the host field of the remote files dialog, it will gladly create silly urls that start with "https://https://" - these are syntactically valid because ":" may occur without port number path segment may be empty, so don't assert. Change-Id: I29b6317daeb76d8f2fd4a22c0908ad2366c36297 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125484 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-15fix typo in commentStephan Bergmann
Change-Id: I267390e6d7251ec59c6374ca904ccba16f2a94bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125253 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2021-11-12Fix (mis-)uses of temporary O[U]StringLiteralStephan Bergmann
...as sub-expressions of ternary operators, which happened to keep compiling after 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String" and e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString" because both branches are of the same type O[U]StringLiteral<N>, and which didn't cause any issues because no dangling pointers to those temporary objects escaped the surrounding full expressions. This was found with an experimental build with VS 2022 with --enable-latest-c++, which would support HAVE_CPP_CONSTEVAL after some linking fix in the configure.ac detection code (which is forthcoming in a later commit) and flagged all these uses in ternary operators as error C7595 "call to immediate function is not a constant expression". That error looks bogus (and it also caused a false > sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to immediate function is not a constant expression so HAVE_CPP_CONSTEVAL will need to remain undefined for VS 2022 until that compiler bug is fixed), but it nicely found all these cases that should arguably be cleaned up. Change-Id: I81de94e8af5a6c50e5fe7dfa1a4b253e0c2a68f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-10new loplugin:stringliteraldefineNoel Grandin
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10Fix typoAndrea Gelmini
Change-Id: I1ab712c8bea7083e0f32c647d783d12a770322a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124941 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-09The CurlOption curl_off_t case appears to be unusedStephan Bergmann
...at least for my clang-cl Windows x86-64 build (see comments at <https://gerrit.libreoffice.org/c/core/+/124452/5#message-10cc4dfb88a258e59f09c5fbf413052aa9ddd49c> "ucb: webdav-curl: rewrite authentication loop for reentrancy") Change-Id: I4f6b255c6a9acb26844b7ef5c11f0f1fcf06b3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124907 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-09Address of dllimport function isn't considered constant expression by clang-clStephan Bergmann
...causing the (mis-)use of std::integral_constant to fail with > In file included from ucb/source/ucp/webdav-curl/CurlUri.cxx:20: > In file included from ucb/source/ucp/webdav-curl/CurlUri.hxx:24: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\memory:11: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\exception:12: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\type_traits:12: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xstddef:11: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\cstddef:13: > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xtr1common(22,26): error: constexpr variable 'value' must be initialized by a constant expression > static constexpr _Ty value = _Val; > ^ ~~~~ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xtr1common(28,16): note: in instantiation of static data member 'std::integral_constant<void (*)(void *), &curl_free>::value' requested here > return value; > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\memory(3195,13): note: in instantiation of member function 'std::integral_constant<void (*)(void *), &curl_free>::operator void (*)(void *)' requested here > _Mypair._Get_first()(_Mypair._Myval2); > ^ > ucb/source/ucp/webdav-curl/CurlUri.cxx(49,25): note: in instantiation of member function 'std::unique_ptr<char, std::integral_constant<void (*)(void *), &curl_free>>::~unique_ptr' requested here > CurlUniquePtr<char> pPart2(pPart); > ^ etc. as the involved functions like curl_free are defined as CURL_EXTERN void curl_free(void *p); in workdir/UnpackedTarball/curl/include/curl/curl.h, where CURL_EXTERN expands to __declspec(dllimport) Change-Id: Ib278cd9e97260b588144d81dba344ccbb5309608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124899 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-08Fix typosAndrea Gelmini
Change-Id: I945c72ce9065d0c59e7ebcb96c70995d5333b67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124841 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-07Typo: implemnented->implementedJulien Nabet
Change-Id: I3171c95523408b69587aaa2bb064c750bc56c55d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124809 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05webdav-curl: there's no non-const Sequence::operator[]Mike Kaganski
... since commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 Change-Id: Ib56e854206074dd247dcd0f876a8a92b3f9af7ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124763 Tested-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03Silence loplugin:toolslong in ucb/source/ucp/webdav-curl/CurlSession.cxxStephan Bergmann
...similarly to how it was already done for its ucb/source/ucp/webdav-neon/NeonSession.cxx cousin Change-Id: I78124f45d4cb08131ee5d6e8c2606b38407c0668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124637 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-03ucb: webdav-curl: consolidate unit testsMichael Stahl
1 CppuniTest makefile should be sufficient, particularly since all 4 of them used gb_CppunitTest_use_library_objects so this should reduce wasted space. Change-Id: I485f0af0aee2b265b56c505ced44257834784e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124608 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03ucb: webdav-curl: convert webdav unit tests to curlMichael Stahl
There's no point in building the tests for neon any more, just build them only if curl is used. This finds a bug in CurlUri::Init() where query and fragment separators need to be added manually. Change-Id: I3dcd1512450522df2c2a7d223b2e29b6c0e794fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124607 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03Fix typosAndrea Gelmini
Change-Id: If203853359b1c30c6cb6feea6c1ff718bcaa0188 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124622 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-01ucb: webdav-curl: remove SerfLockStore::getLockToken()Michael Stahl
Looking rather obsolete, plus NonInteractive_LOCK() can just get the token as a parameter since it's called only by LockStore. Change-Id: I4c5c84135592fbab20f36c93d0c99b80fccb0976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124453 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: fix MOVE/COPY/DELETE crashMichael Stahl
These need "nobody"; some errors like 401 will return a body that should be ignored. Change-Id: If2f726aa34d4d3fae1bd61bc87b62e2d55a7ff26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124561 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: rewrite authentication loop for reentrancyMichael Stahl
Surprisingly calling authenticate() can lead to a reentrant call via event loop, which fortunately deadlocks with non-recusive mutex, or we'd have a much more difficult to debug problem: 5 std::unique_lock<std::mutex>::unique_lock() 7 http_dav_ucp::CurlProcessor::PropFind() 8 http_dav_ucp::CurlSession::PROPFIND() (this=0x391fe80, rURIReference="/testL.odt", depth=http_dav_ucp::DAVZERO, o_rResourceInfos=std::__debug::vector of length 0, capacity 0, rEnv=...) 9 http_dav_ucp::DAVResourceAccess::PROPFIND() (this=0xab3bb00, nDepth=http_dav_ucp::DAVZERO, rResInfo=std::__debug::vector of length 0, capacity 0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 10 http_dav_ucp::Content::getProperties() (this=0xa8ba9a0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 15 SfxBaseModel::isVersionable() (this=0x7159c90) 19 SfxBindings::Update_Impl(SfxStateCache&) 24 Timer::Invoke() (this=0x7394708) 30 g_main_loop_run () 35 (anonymous namespace)::executeMasterPasswordDialog() 40 (anonymous namespace)::UUIInteractionHandler::handle() 41 PasswordContainer::RequestPasswordFromUser() 42 PasswordContainer::GetMasterPassword() 47 PasswordContainer::find() 48 uui::PasswordContainerHelper::handleAuthenticationRequest() 57 ucbhelper::InterceptedInteraction::handle() 58 http_dav_ucp::DAVAuthListener_Impl::authenticate() 59 http_dav_ucp::CurlProcessor::ProcessRequestImpl() 60 http_dav_ucp::CurlProcessor::ProcessRequest() 61 http_dav_ucp::CurlProcessor::PropFind() 62 http_dav_ucp::CurlSession::PROPFIND() (this=0x391fe80, rURIReference="/testL.odt", depth=http_dav_ucp::DAVZERO, o_rResourceInfos=std::__debug::vector of length 0, capacity 0, rEnv=...) 63 http_dav_ucp::DAVResourceAccess::PROPFIND() (this=0xab8c060, nDepth=http_dav_ucp::DAVZERO, rResInfo=std::__debug::vector of length 0, capacity 0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 64 http_dav_ucp::Content::getProperties() (this=0xa8ba9a0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578) 67 ucbhelper::PropertySetInfo::hasPropertyByName() (this=0xa8d7a20, Name="TitleOnServer") 68 SfxBaseModel::getTitle() 74 framework::TitleHelper::impl_updateTitle() 75 framework::TitleHelper::documentEventOccured() 78 SfxBaseModel::postEvent_Impl() (this=0x7159c90, aName="OnModeChanged", xController=empty uno::Reference) 79 SfxBaseModel::Notify() 80 SfxBroadcaster::Broadcast() 81 SfxObjectShell::SetModalMode_Impl() 82 SfxViewFrame::SetModalMode(bool) 83 SfxFrameWindow_Impl::ModalHierarchyHdl() 86 SalFrame::NotifyModalHierarchy() 88 SalGtkFilePicker::execute() 92 ModelData_Impl::OutputFileDialog() 93 SfxStoringHelper::GUIStoreModel() Need to move authentication loop to the outer function, so that all the option guards in ProcessRequestImpl() are reset/set again, and also delay setting the option guards from the various callers so they can be reset in ProcessRequest() before authenticate(). Change-Id: Id697b1459f94f80fc58cee7768c2bd388369b29c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124452 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: implement CurlSession::abort()Michael Stahl
It looks like libcurl has an API to wake up a transfer in another thread, but have to use curl_multi_poll() instead of curl_multi_wait() to enable that. Change-Id: I728416eba45eb6665b0041955cdce8bee07e845e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124220 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: escape broken SharePoint 2016 URIsMichael Stahl
[ reimplement commit 069aa870aadb9f9069e8715c8be30394410f0288 ] Change-Id: I01a93e3a448e6dc921d1e0471ae01c8ac8feea11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124218 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#82744: fix WebDAV lock/unlock behaviour - part 4Michael Stahl
[ reimplement Sharepoint 2013 workaround from commit fed2984281a85a5a2f308841ec810f218c75f2ab ] Change-Id: Ib7f5a66e32d630e900f5f77c882ba791a9ab7aac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124217 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: use curl_multi API to support read timeoutMichael Stahl
This enables passing timeout to the curl_multi_wait() function. Change-Id: Ic0ab9afe955b3625be0a44304c69882eb896abf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124219 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: remove locks from LockStore after AUTH errorMichael Stahl
[ reimplement commit 94e4695bcfcb9356d37942c47359b94531ef7b95 ] Change-Id: I15d1a95074dcad3f2c642bb0819741a2b0f734c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124216 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: convert hrefs in PROPFIND response to URIMichael Stahl
curl_url_set(..., CURLUPART_URL, ...) doesn't work with relative URLs that are absolute paths. Change-Id: Ic67c99262fe5b399511f7a2e7b8592d7e065b2c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124451 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: implement dead properties in PROPFIND/PROPPATCHMichael Stahl
And delete a bunch of ghastly code. Change-Id: I1a01bfda5f86202d537f87b97d83cc5c0a65ed0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124079 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: clean up CurlUri m_Path messMichael Stahl
Fix the confused nonsense and add GetRelativeReference() for the cases where the path+query+fragment is needed. Change-Id: I663d20a686dcc787171ae7702d2a64451fa53807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124078 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: convert URI reference to URI as early as possibleMichael Stahl
Ensure that LockStore uses the full URL as key, not just the path. Change-Id: I84caf0d22e8c0ba176c19d004ee8ffcd2fdd05c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124077 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: handle "depth" in WebDAVResponseParserMichael Stahl
Also remove a spurious fall-through that probably doesn't matter in practice because the "status" element follows the "prop" element that contains "activelock" in the schema so at that time maStatus should always be empty for a valid response. Change-Id: If4cc8dbc75391d76ff497b83dd0f7fd00eb34a33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124076 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: Don't crash when accessing WebDAV resource after auth failedMichael Stahl
[ replicate part of commit 162a472d55cf9fb9aaa6d5eae625b3da2273a516 ] Change-Id: Ia48b95d27cc9da8688104a05a758f82415a2d2dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123506 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: loplugin:constfields in ucbMichael Stahl
[ replicate commit d8f8b4375998b62431c8605004e7c7d5c921ccc9 ] Change-Id: I720fdfbeab13e9dd210f11a613cb606e946d68e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123505 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#106955: Open WebDAV resources on which PROPFIND failsMike Kaganski
When PROPFIND fails on a WebDAV resource, its IsDocument property stays undefined, and so stream creation fails. Proposed solution is to default to IsDocument=true for all WebDAV documents where we cannot get the property from server. Such resources also fail to return their locking options, so defaulting to server properties. When later locking is attempted on it, the attempt fails with user notification (a dialog saying that getting information from server failed). Proposed solution is to check Content-Disposition header in such resources, and in case it's attachment, disable lock on this resource. The rationale for this is that "In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed ... as an attachment, that is downloaded and saved locally" (see MDN: https://developer.mozilla.org/en/docs/Web/HTTP/Headers/Content-Disposition Also, Content::getProperties wasn't ready for PROPFIND returning empty result. [ port of commit fbc04c97231d629c1b5e9e57203dbe8d8eb06714 ] Change-Id: If0b4c10ef7b7b108a8779c773c65e25973d32b46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123504 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: const-ness fixesStephan Bergmann
[ port of commit 95cfef300eb1a32d700479d2cefddc3fc4d0b37c ] Change-Id: Ic57525aa9a56c3d2f7f9cc5f0ca038bbfa8853a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123503 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-01ucb: webdav-curl: tdf#102499 (9): Fix eXo Platform WebDAV on 'Save Remote File'Giuseppe Castagno
[ port of commit 59d6d5579528a66e55b75987d2d959968db485a8 ] Change-Id: I32c2bb8c3985ce8d8cf8cd0aeae513815ed40b6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123502 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>