Commit graph

103 commits

Author SHA1 Message Date
Gökay Şatır
b51413c0a0 Admin console: Cosmetic changes and documentation.
Change-Id: I977b5bc56f44c44b8bedf9f9bd710e7050fe67ff
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2020-12-07 17:30:51 -05:00
Gökay Şatır
ace1c23a99 Admin console log levels.
Now chosen log level is propagated to forkit and kits.
Also, admin console users can filter logs according to their channel names on client side.

Change-Id: Ife15a6148ed87533b81e9d63da252c633e74e559
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2020-12-07 17:30:51 -05:00
Ashod Nakashian
8f2ded18da wsd: misc minor cleanup
Change-Id: I39911e6a6b16661173ae69e39d353e517857f282
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-02 07:56:03 -05:00
Ashod Nakashian
5f07da1298 wsd: privatize public members
Change-Id: Iab57b946cc29814155fccde9b1fbb0c6697b8c26
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-10-31 15:07:53 -04:00
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Miklos Vajna
92543758a7 wsd: mark these functions as static
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>
2020-09-18 14:05:37 +02:00
Aron Budea
d876290762 wsd: Don't fail if config item is missing in loolwsd.xml
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>
2020-09-09 08:55:55 +02:00
Tomaž Vajngerl
ca00470722 allow saving a PDF, add "view_comment" state
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>
2020-07-27 16:40:12 +02:00
Tor Lillqvist
d0672cd2b9 Slight refactoring to make planned re-plumbing of iOS app easier
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>
2020-07-03 08:41:02 +02:00
Ashod Nakashian
9a427524d1 wsd: support --cleanup in loolwsd
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>
2020-07-01 06:14:39 +02:00
Szymon Kłos
11965d083e notebookbar: early init
- 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>
2020-06-30 08:15:25 +02:00
Tor Lillqvist
7f25109f72 tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app
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>
2020-06-26 13:09:51 +02:00
Ashod Nakashian
fae093d89d wsd: std::move rather than copy
Change-Id: I7c4eea8aa5ab57444aa395f727e4ce6ac713b665
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95337
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-06-02 20:01:16 +02:00
Ashod Nakashian
224ef08c7f wsd: single-char string literals -> char
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>
2020-06-02 01:31:26 +02:00
Michael Meeks
dec683218a Proxy: move RequestDetails to its own header.
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>
2020-05-12 20:30:17 +02:00
Michael Meeks
2cbf6d12a0 Proxy: only accept request from localhost.
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>
2020-05-08 18:05:14 +02:00
Miklos Vajna
19745e2e44 libfuzzer: fix build
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>
2020-05-07 14:04:57 +02:00
Michael Meeks
fdd4b4f63d mobile: remove a few conditionals.
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>
2020-05-02 21:31:25 +02:00
Pranam Lashkari
8b349716eb killpoco: removed Poco::Process completely
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>
2020-04-29 14:27:54 +02:00
Andras Timar
33000dfded typo fixes in comments and code
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>
2020-04-26 23:19:52 +02:00
Jan Holesovsky
eb88cb485c Allow running the production build under a non-lool user when necessary.
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>
2020-04-24 20:58:43 +02:00
Tor Lillqvist
0fa4553dcf Put FUZZER-specific members inside #ifdef FUZZER
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>
2020-04-20 12:57:05 +02:00
Tor Lillqvist
6b8456679f Surround some code that is unused in the mobile apps with #if !MOBILEAPP
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>
2020-04-20 11:17:29 +02:00
Tor Lillqvist
7a416cbf0a Clarify what ChildProcess and WSProcess are
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>
2020-04-18 16:34:49 +02:00
Tor Lillqvist
4eb598711c Use #pragma once
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>
2020-04-18 15:00:18 +02:00
Ashod Nakashian
40684c4687 wsd: const correctness and cosmetics
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>
2020-04-17 02:35:52 +02:00
Jan Holesovsky
7f96586922 Welcome: Serve the release notes files from a given (configured) directory.
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>
2020-04-16 11:30:00 +02:00
gokaysatir
9e0594ee2d add pretty name - Android patch
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>
2020-04-11 13:43:31 +02:00
Miklos Vajna
e087a0079c ForKitProcWSHandler: remove std::enable_shared_from_this inheritance
This was added in commit 70af76e28c
(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>
2020-04-08 13:52:35 +02:00
Gabriel Masei
70af76e28c Replaced pipe with websocket based on Unix socket in communication with ForKit
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>
2020-04-07 15:04:47 +02:00
gokaysatir
a486bad79b tdf#130568 - Add server os pretty name to help->about
Change-Id: Id6de533dfb8e34a05d348f8ae701bf3c524c9b95
2020-04-01 20:45:32 +01:00
Michael Meeks
4d9d769d95 Expose disk space and session checks via LOOLWSD class.
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>
2020-03-16 19:36:42 +01:00
Henry Castro
7ba4e9dd23 wsd: debug: run the server with a single "lokit" process
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>
2020-03-06 13:37:53 +01:00
Jan Holesovsky
48283deca5 Just try to catch everything in the getSafeConfig().
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>
2020-02-29 11:02:52 +01:00
Jan Holesovsky
09005eb1cf android: Don't even try to read these values, seem to trigger an exception.
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>
2020-02-29 11:01:00 +01:00
Miklos Vajna
57a35bb96c Add an initial libfuzzer based fuzzer
- 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>
2020-02-22 12:18:22 +01:00
Jan Holesovsky
ad32888d7c mobile: Unify the mutex usage that protects the main lokit thread.
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>
2020-02-06 09:44:26 +01:00
Michael Meeks
8f91659ae0 test: dung out redundant LOOL_TEST_CLIENT_PORT.
And cleanup other related oddities.

Change-Id: I2d179a2ece6a8553e10e406ad4e5da08a2ff58e5
2020-01-21 15:07:54 +00:00
Michael Meeks
e6a3364e93 Move file url anonymization down from LOOLWSD into FileUtil.
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>
2020-01-18 20:05:35 +01:00
Corentin Noël
b2f893ae0e Allow ConfigValueGetter to be used with uint64 on 32 bits systems
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>
2019-11-22 18:48:05 +01:00
Gabriel Masei
d597f22dac Add minimal TLS support for communication with storage
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>
2019-10-08 18:57:36 +02:00
Ashod Nakashian
477d6714d9 wsd: SessionId -> ConnectionId
"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>
2019-09-22 20:20:24 +02:00
Michael Meeks
327869fffe re-factor childsession onLoad callback to cleanup parameter clutter.
Change-Id: I0665db05845a910abf1cc56e13d2f9845cc5c373
2019-08-26 16:29:12 -04:00
Tor Lillqvist
1d3ac69ffd Avoid some "RuntimeConstant instance read before being initialized" issues
(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>
2019-08-20 10:55:32 +02:00
Ashod Nakashian
919a93cd4b wsd: improved anonymization algorithm
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
2019-08-17 04:26:35 +02:00
Ashod Nakashian
226c2fe71c wsd: unify anonymization flags under one
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
2019-08-17 03:42:19 +02:00
Tor Lillqvist
a158686422 The SavedClipboards stuff presumably makes no sense for MOBILEAPP
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
2019-08-12 13:20:52 +03:00
Michael Meeks
9e791fb0d4 clipboard: persist selections for a while after a view closes.
re-factor ClientSession state to be a simpler state machine.
Have a nice disconnect / disconnected handshake on view close.

Change-Id: Ie933cc5c7dfab46c66f4d38a4d75c459aa1cff87
2019-08-05 22:21:54 -04:00
Michael Meeks
4a9de331ed Unit testing - add more hooks and helpers.
Change-Id: Ieb12699e3b012606eaa0be3cc94d6f9b58adc441
2019-08-05 21:08:01 -04:00
Michael Meeks
52e477e57e Switch to text/html for paste where we can.
Build special URLs to detect the same host being in-use, and much more.

Change-Id: I0ca639ea416cb78bf5e5274eac4400542b6b2cda
2019-08-05 15:47:47 -04:00