summaryrefslogtreecommitdiffstats
path: root/wsd/LOOLWSD.hpp
Commit message (Collapse)AuthorAgeFilesLines
* fix license headersAndras Timar2020-10-011-2/+0
| | | | Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
* wsd: mark these functions as staticMiklos Vajna2020-09-181-1/+1
| | | | | | | | | | So that it's more obvious that they don't even read the state of the object. Change-Id: I71d39bf3a20989c8fbf3410c2f1d2a98661c49d5 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102986 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* wsd: Don't fail if config item is missing in loolwsd.xmlAron Budea2020-09-091-1/+9
| | | | | | | | | | | | | After upgrading from old versions that didn't include config.storage.ssl in loolwsd.xml, an exception was thrown and not caught, and loolwsd failed to start with the following message: "Not found: storage.ssl.cert_file_path". Change-Id: Id0ca76632c513c6f5c80797a2c7d20f0173e4b56 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102250 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* allow saving a PDF, add "view_comment" stateTomaž Vajngerl2020-07-271-2/+17
| | | | | | | | | | | | | | | | This adds a "view_comment" in addition to "view" and "edit" state into discovery.xml. In case it is enabled, the filters let the comment commands through to core. In addition add "Save Comment" menu action to allow saving the comments, which is enabled when in "read-only" with "view_comment" mode. Change-Id: I3ab3dbee93ee2167ae96adea7025fc0b385f8201 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99473 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
* Slight refactoring to make planned re-plumbing of iOS app easierTor Lillqvist2020-07-031-3/+0
| | | | | | | | Change-Id: I274cf167c6593de6f073301f7071f2173b40cbab Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97760 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
* wsd: support --cleanup in loolwsdAshod Nakashian2020-07-011-0/+1
| | | | | | | | | | | | | | | | | | Leaving behind jails with bind-mount entries makes build-workspace removal complicated, and jenkins builds start failing. The cleanup stage is integrated in Makefiles and should be transparent. In the event that manual cleanup is necessary, 'loolwsd --cleanup' can be invoked. Change-Id: Ia4b99b0c66e56dfa2d50e79b0ba98f714cf32886 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97470 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* notebookbar: early initSzymon Kłos2020-06-301-0/+1
| | | | | | | | | | | | - read settings from loolwsd.xml - in case of notebookbar activated send :notebookbar parameter - for mobile apps I left empty parameter in setupKitEnvironment calls Change-Id: I5813589564b37eecc1e77c5d0eb737eca5f92f04 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97233 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
* tdf#128502: Chunk of work to enable "multi-tasking" in the iOS appTor Lillqvist2020-06-261-1/+3
| | | | | | | | | | | | Seems to not cause any serious regressions in the iOS app or in "make run", but of course I am not able to run a comprehensive check of all functionality. Change-Id: I44a0e8d60bdbc0a885db88475961575c5e95ce88 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93037 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* wsd: std::move rather than copyAshod Nakashian2020-06-021-1/+2
| | | | | | | Change-Id: I7c4eea8aa5ab57444aa395f727e4ce6ac713b665 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95337 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* wsd: single-char string literals -> charAshod Nakashian2020-06-021-2/+2
| | | | | | | | | | More readable and typically more efficient. Change-Id: I9bd5bfc91f4ac255bb8ae0987708fb8b56b398f8 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95285 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
* Proxy: move RequestDetails to its own header.Michael Meeks2020-05-121-0/+1
| | | | | | | | | Share it with various other places requiring similar data. Change-Id: I873f56798f5a34dcf7440456bd649b68f6d3df98 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94069 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* Proxy: only accept request from localhost.Michael Meeks2020-05-081-0/+1
| | | | | | | | | Also - add net.proxy_prefix setting to enable this. Change-Id: I87f5aab2316c053ea1bc8cc177e4a54ba0455697 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93682 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* libfuzzer: fix buildMiklos Vajna2020-05-071-2/+2
| | | | | | | | | | And bypass configuration access at two new places, so the fuzzer can find more interesting failures. Change-Id: I4c09172e781a7c6120b8c4befe1a84fdd74f2ddc Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93617 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
* mobile: remove a few conditionals.Michael Meeks2020-05-021-6/+2
| | | | | | | Change-Id: I5f306904b0b0533290d5533bbc3452217689eaec Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93324 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* killpoco: removed Poco::Process completelyPranam Lashkari2020-04-291-4/+3
| | | | | | | Change-Id: Iba67abf9342c11517c69c1d94903bf4752aa87d6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/83770 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
* typo fixes in comments and codeAndras Timar2020-04-261-2/+2
| | | | | | | Change-Id: I6f31e050aab701e31064e1abc9429dce0a50c279 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92953 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* Allow running the production build under a non-lool user when necessary.Jan Holesovsky2020-04-241-0/+1
| | | | | | | | | But it is insecure, so warn about that. Change-Id: I151be64f53521e217a5498c0531c9ef2ff8db818 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92822 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
* Put FUZZER-specific members inside #ifdef FUZZERTor Lillqvist2020-04-201-0/+2
| | | | | | | | | Any use of them is already inside such ifdefs. Change-Id: Ide63a58eeb1c97bb0431c3f0cfa51359476352bc Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92557 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* Surround some code that is unused in the mobile apps with #if !MOBILEAPPTor Lillqvist2020-04-201-1/+5
| | | | | | | | | | | Reduces the risk of starting to look into something that is actually never used in the mobile apps, when your intent is to re-work soemthing for the mobile apps. Change-Id: I04c562758a1b336690c7adbfd32b260cf26d9f87 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92554 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* Clarify what ChildProcess and WSProcess areTor Lillqvist2020-04-181-4/+4
| | | | | | | Change-Id: I13dd37c840d2c8b811bb56614fbc9f8ee2e44d40 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92475 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* Use #pragma onceTor Lillqvist2020-04-181-4/+1
| | | | | | | | | | LibreOffice core uses that, too, and we support an even more restricted set of compilers. Change-Id: I0d0e2c8608e323eb5ef0f35ee8c46d02ab49a745 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92467 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
* wsd: const correctness and cosmeticsAshod Nakashian2020-04-171-2/+2
| | | | | | | Change-Id: I46751dc0a6d7c693fd9ab371c1e9a12bac309611 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92098 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* Welcome: Serve the release notes files from a given (configured) directory.Jan Holesovsky2020-04-161-0/+1
| | | | | | | Change-Id: Iae36c1c48fee963659662436d594be659908a3e3 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92216 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
* add pretty name - Android patchgokaysatir2020-04-111-4/+0
| | | | | | | Change-Id: If0de49884954cde26bfbe8ba1dce8844af5b30bf Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91831 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* ForKitProcWSHandler: remove std::enable_shared_from_this inheritanceMiklos Vajna2020-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added in commit 70af76e28cbca4a45869fcecfe221d21eb7a3790 (Replaced pipe with websocket based on Unix socket in communication with ForKit, 2020-04-02), but it seems to me that the shared_from_this() member function (which is now available, due to ineritance) is not actually called anywhere, so this is not necessary. Additionally, Debian 8 / gcc-4.9 has problems compiling this: In file included from /usr/include/c++/4.9/bits/shared_ptr.h:52:0, from /usr/include/c++/4.9/memory:82, from wsd/AdminModel.hpp:13, from wsd/AdminModel.cpp:12: /usr/include/c++/4.9/bits/shared_ptr_base.h: In instantiation of ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]’: /usr/include/c++/4.9/bits/shared_ptr.h:316:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler]’ /usr/include/c++/4.9/bits/shared_ptr.h:588:39: required from ‘std::shared_ptr<_Tp1> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ForKitProcWSHandler; _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’ /usr/include/c++/4.9/bits/shared_ptr.h:604:42: required from ‘std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = ForKitProcWSHandler; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’ ./wsd/LOOLWSD.hpp:201:97: required from here /usr/include/c++/4.9/bits/shared_ptr_base.h:1096:64: error: call of overloaded ‘__enable_shared_from_this_helper(std::__shared_count<>&, ForKitProcWSHandler*&, ForKitProcWSHandler*&)’ is ambiguous So just remove it till that inheritance is needed. Change-Id: I74d38b90bcf06d4490feed31783c098ed831f1ee Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91879 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Gabriel Masei <gabriel.masei@1and1.ro>
* Replaced pipe with websocket based on Unix socket in communication with ForKitGabriel Masei2020-04-071-1/+171
| | | | | | | Change-Id: I80f1a4e84ca6820503966a8ee5d9958a150eac14 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91585 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* tdf#130568 - Add server os pretty name to help->aboutgokaysatir2020-04-011-0/+4
| | | | Change-Id: Id6de533dfb8e34a05d348f8ae701bf3c524c9b95
* Expose disk space and session checks via LOOLWSD class.Michael Meeks2020-03-161-0/+4
| | | | | | | Change-Id: I7b135d325147694cc33946b34a29ab96b2e2b918 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90577 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* wsd: debug: run the server with a single "lokit" processHenry Castro2020-03-061-0/+3
| | | | | | | | | | | Sometimes it is very useful to have one "lokit" process, to focus on a 100% reproducible bug, and not worry that server pre-spawn several processes. Change-Id: I414a8145b53a0601a282cba9c245833f5d07f404 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89999 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
* Just try to catch everything in the getSafeConfig().Jan Holesovsky2020-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Poco::Exception is derived from std::exception, yet there were cases where it was not caught - no idea why: I/DEBUG (24700): #00 pc 000371e4 /system/lib/libc.so (tgkill+12) I/DEBUG (24700): #01 pc 00013fb9 /system/lib/libc.so (pthread_kill+52) I/DEBUG (24700): #02 pc 00014bd7 /system/lib/libc.so (raise+10) I/DEBUG (24700): #03 pc 00011519 /system/lib/libc.so (__libc_android_abort+36) I/DEBUG (24700): #04 pc 0000fca4 /system/lib/libc.so (abort+4) I/DEBUG (24700): #05 pc 000126e9 /system/lib/libc.so (__libc_fatal+16) I/DEBUG (24700): #06 pc 0001159d /system/lib/libc.so (__assert2+20) I/DEBUG (24700): #07 pc 00064fed /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so I/DEBUG (24700): #08 pc 00065183 /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so I/DEBUG (24700): #09 pc 0006cb79 /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so I/DEBUG (24700): #10 pc 0006c527 /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so I/DEBUG (24700): #11 pc 0006c4ef /data/app/com.collabora.libreoffice-1/lib/arm/libc++_shared.so (__cxa_throw+74) I/DEBUG (24700): #12 pc 001be25c /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZNK4Poco4Util21AbstractConfiguration7getBoolERKNSt6__ndk112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE+208) I/DEBUG (24700): #13 pc 001847fd /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD17ConfigValueGetterclERb+12) I/DEBUG (24700): #14 pc 001847c3 /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD13getSafeConfigIbEEbRN4Poco4Util20LayeredConfigurationERKNSt6__ndk112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERT_+22) I/DEBUG (24700): #15 pc 00184747 /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD14getConfigValueIbEET_RN4Poco4Util20LayeredConfigurationERKNSt6__ndk112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEES1_+38) I/DEBUG (24700): #16 pc 0018748b /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN7LOOLWSD10initializeERN4Poco4Util11ApplicationE+1334) I/DEBUG (24700): #17 pc 001c7274 /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so (_ZN4Poco4Util11Application3runEv+28) I/DEBUG (24700): #18 pc 00134fbf /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so I/DEBUG (24700): #19 pc 00134df7 /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so I/DEBUG (24700): #20 pc 00134dc5 /data/app/com.collabora.libreoffice-1/lib/arm/libandroidapp.so I/DEBUG (24700): #21 pc 000137a3 /system/lib/libc.so (_ZL15__pthread_startPv+30) I/DEBUG (24700): #22 pc 00011883 /system/lib/libc.so (__start_thread+6) Change-Id: Ica643f88d572b239b9a124e31cb4552f86439bf6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89715 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* android: Don't even try to read these values, seem to trigger an exception.Jan Holesovsky2020-02-291-0/+2
| | | | | | | | | All the code that is using them is compiled out on Android anyway. Change-Id: Ica349135202211ecdcb095bb82aa677f2dee19ba Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89714 Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* Add an initial libfuzzer based fuzzerMiklos Vajna2020-02-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - target ClientSession::_handleInput(), since crashing there would bring down the whole loolwsd (not just a kit process), and it deals with input from untrusted users (browsers) - add a --enable-fuzzers configure switch to build with -fsanitize=fuzzer (compared to normal sanitizers build, this is the only special flag needed) - configuring other sanitizers is not done automatically, either use --with-sanitizer=... or the environment variables from LODE's sanitizer config - run the actual fuzzer like this: ./clientsession_fuzzer -max_len=16384 fuzzer/data/ - note that at least openSUSE Leap 15.1 sadly ships with a clang with libfuzzer static libs removed from the package, so you need a self-built clang to run the fuzzer (either manual build or one from LODE) - <https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/refs/heads/master/efficient_fuzzing.md#execution-speed> suggests that "You should aim for at least 1,000 exec/s from your fuzz target locally" (i.e. one run should not take more than 1 ms), so try this minimal approach first. The alternative would be to start from the existing loolwsd_fuzzer binary, then step by step cut it down to not fork(), not do any network traffic, etc -- till it's fast enough that the fuzzer can find interesting input - the various configurations start to be really complex (the matrix is just very large), so try to use Util::isFuzzing() for fuzzer-specific changes (this is what core.git does as well), and only resort to ifdefs for the Util::isFuzzing() itself Change-Id: I72dc1193b34c93eacb5d8e39cef42387d42bd72f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89226 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* mobile: Unify the mutex usage that protects the main lokit thread.Jan Holesovsky2020-02-061-0/+4
| | | | | | | | | | Effectively both approaches were doing the same thing, let's unify to the iOS way to minimize the platform-specific code. Change-Id: I11290410a536c26db054ffcb87e3b64cc2a11c07 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/84589 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
* test: dung out redundant LOOL_TEST_CLIENT_PORT.Michael Meeks2020-01-211-0/+2
| | | | | | And cleanup other related oddities. Change-Id: I2d179a2ece6a8553e10e406ad4e5da08a2ff58e5
* Move file url anonymization down from LOOLWSD into FileUtil.Michael Meeks2020-01-181-3/+3
| | | | | | | Change-Id: I415c73b10621d5c7c942367bbf38a3bbd9bf8f27 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87024 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
* Allow ConfigValueGetter to be used with uint64 on 32 bits systemsCorentin Noël2019-11-221-1/+1
| | | | | | | Change-Id: I5d19c97c6900cea6476e85afd4cfe9885f6c8fa0 Reviewed-on: https://gerrit.libreoffice.org/83513 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
* Add minimal TLS support for communication with storageGabriel Masei2019-10-081-6/+28
| | | | | | | Change-Id: Iafd9946a4240063c07f5c519b8af30b52e23d3e8 Reviewed-on: https://gerrit.libreoffice.org/80373 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
* wsd: SessionId -> ConnectionIdAshod Nakashian2019-09-221-3/+3
| | | | | | | | | | | | "Session" is too generic and can be misleading. This is really a connection ID, or a connection-session ID, so it's more sensible to call it ConnectionId to signify that it's a connection-specific ID. Change-Id: I0f12b1cf80d4853a27535101093ef6b7a3e0d438 Reviewed-on: https://gerrit.libreoffice.org/79326 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
* re-factor childsession onLoad callback to cleanup parameter clutter.Michael Meeks2019-08-261-1/+1
| | | | Change-Id: I0665db05845a910abf1cc56e13d2f9845cc5c373
* Avoid some "RuntimeConstant instance read before being initialized" issuesTor Lillqvist2019-08-201-0/+10
| | | | | | | | | | | (In the !ENABLE_SSL case.) Possibly the SSL or not ifdeffery could be cleaned up a bit more. Change-Id: I0c9b4e956dcd317d6622a7394044fed0c4f2d976 Reviewed-on: https://gerrit.libreoffice.org/77780 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
* wsd: improved anonymization algorithmAshod Nakashian2019-08-171-2/+4
| | | | | | | | | | | | | | Better hashing algorithm based on FNV-1a. Adds support for salting the hash, and for providing salt via configuration. More unit-tests added, and better formatting. Change-Id: I2be42675d0cdbaa73c3d7faed99e07631a9c20fc Reviewed-on: https://gerrit.libreoffice.org/70034 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/71091
* wsd: unify anonymization flags under oneAshod Nakashian2019-08-171-4/+3
| | | | | | | | | | | | This simplifies the anonymization configuration as virtually always they are all either enabled together, or not at all. Change-Id: I6fe60f5287fc5d71cd7a6ac3268eac67e5e6e9fb Reviewed-on: https://gerrit.libreoffice.org/70033 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/71090
* The SavedClipboards stuff presumably makes no sense for MOBILEAPPTor Lillqvist2019-08-121-0/+2
| | | | | | | | It seems to be strongly related to HTTP things at least in error handling. So bypass as cleanly as possible in the MOBILEAPP case for now. Change-Id: If9540f166293635513a3ab06371f01ad381a8cb2
* clipboard: persist selections for a while after a view closes.Michael Meeks2019-08-051-0/+2
| | | | | | | re-factor ClientSession state to be a simpler state machine. Have a nice disconnect / disconnected handshake on view close. Change-Id: Ie933cc5c7dfab46c66f4d38a4d75c459aa1cff87
* Unit testing - add more hooks and helpers.Michael Meeks2019-08-051-0/+3
| | | | Change-Id: Ieb12699e3b012606eaa0be3cc94d6f9b58adc441
* Switch to text/html for paste where we can.Michael Meeks2019-08-051-1/+1
| | | | | | Build special URLs to detect the same host being in-use, and much more. Change-Id: I0ca639ea416cb78bf5e5274eac4400542b6b2cda
* added server uptime field to admin consoleGeorge2019-07-191-0/+2
| | | | | Change-Id: Id23fee1299b87095f186ce7aaa8c2d2e0f3cef52 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
* debug: show WebSocketURI & a unique host id in help -> about.Michael Meeks2019-05-171-0/+3
| | | | | | Rather useful for debugging clustering issues. Change-Id: I6d5f224bf8a3e4034c419137c8ad2b17fdf265ed
* Revert "wsd: add boost::locale generation and caching"Jan Holesovsky2019-03-151-2/+0
| | | | This reverts commit c2aef686012c4130553a0d36f260b12615408126.
* wsd: add boost::locale generation and cachingHenry Castro2019-03-051-0/+2
| | | | Change-Id: I75009a87038632ceaddb29094d340b6d9066d5ef