Commit graph

114 commits

Author SHA1 Message Date
Ashod Nakashian
a7a204f16e wsd: configuration setting to control embedded-url hexifying
Change-Id: I7ed65af7341aa7dec3c9ad8d5cd503c34c355571
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 8f4316b45b1aad7a041e8b02d92e5ef10d63b2b3)
2021-09-13 09:40:09 -04:00
Michael Meeks
af4dc35041 Configuration - clarify various key settings.
Also add link to SDK documentation.

Change-Id: Ib58a295fb96c4198906653bfe3a1c29d2ae6346b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-08-10 20:40:21 +01:00
Michael Meeks
8ad5e962d7 Discourage accidental proxy_prefix fiddling.
Change-Id: I12e2ba227113eddf5bad1db192a87e22baa325d1
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-08-10 20:40:21 +01:00
Pranam Lashkari
e02e1df76d Introduce Freemium options
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib6b68ff74839cf84f2d8c8cfb7d380be9209f923
2021-07-20 14:41:18 +05:30
Tor Lillqvist
5998980c8d Add some comments for developers
Many of the settings in loolwsd.xml that you might want to tweak this
or that way during development are set on the loolwsd command-line for
a "make run". Don't waste time on trying to set them in loolwsd.xml
and wondering why it has no effect. I just did that. Hopefully these
comments will avoid such in the future.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I896e9cb2830bf36c165842bff53f0e4e471599ae
2021-07-08 12:07:52 +03:00
Jerzy Drozdz
65db910846 Added missing class A ip addresses regex to config file.
Signed-off-by: Jerzy Drozdz <jerzy.drozdz@gmail.com>
Change-Id: If4ccaf7bf0b668979064357ab606b473bd497f11
Signed-off-by: Jerzy Drozdz <jerzy.drozdz@gmail.com>
2021-06-09 16:16:12 +03:00
Tor Lillqvist
eee8fe99d5 Avoid maximum/minimum logging level terminology for newly introduced settings
(Also in variable names.)

Better to just use terms that say what we mean, i.e. most verbose and
least verbose.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I80d74fda8b80bd34d194c3df97d246a41368189b
2021-05-31 15:06:57 +03:00
Tor Lillqvist
b7ca93a41a Add the possibilty to set a thread-local logging level
Add a way to set it from the client.

For now, in the Help > About dialog, the L key toggges the logging
level between the default (whatever is set in loolwsd.xml or on the
loolwsd command line) and the maximum a client is allowed to set
(which also can be set in loolwsd.xml or on the loolwsd command line).

Also while at it, uncouple the toggling of the Trace Event generation
from the triple-click tha toggles tile debugging. It is now on the T
key.

Also swap the meaning of "min" and "max" for the logging levels. Even
if the Poco::Message::Priority values are such that the less urgent
priorities have a numerbcally higher value, conceptually it is more
clear to say the more urgent priorities (levels) are "higher".

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I5383b16ead7d2d378901525eb0d16513d88f045e
2021-05-31 10:56:19 +03:00
Tor Lillqvist
636069430e Also add logging.min_level_settable_from_client
We don't want a client to be able to turn logging off completely
either.

Note, just to avoid potential confusion: This is about the LOG_INF(),
LOG_WRN(), LOG_TRC() etc logging here in Online. Not related to my
recent work on Trace Event format logging.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I3de527cb9f69d9a5269b1db2e1d4602e7117f22e
2021-05-31 10:56:19 +03:00
Tor Lillqvist
4136e024f9 Add logging.max_level_settable_from_client setting
(Not used yet.)

The intent is that the JS code will be able send the server a message
that adjusts the logging level for the WSD thread(s) and Kit processes
handling that client.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I88ac301f002b1f3a55a5d8c9e3650babdedc1e0d
2021-05-31 10:56:19 +03:00
Tor Lillqvist
541d9f3be5 Add Emacs mode line and indent the trace_event.path element correctly
Change-Id: Idcd1ec3ef111aa255446b8504bb1a70c30ff7f7a
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-31 10:56:19 +03:00
Tor Lillqvist
9c6b74ad08 Use a loolwsd.xml setting instead of --enable-trace-event-logging
That is our convention, and this also avoids a global variable in the
kit process.

Change-Id: I37d2d53aa7eb24f9848fa8ef98bc57d75db90d13
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-19 13:33:26 +03:00
Andras Timar
24aaa0dcd4 3 new build-time configurable settings
Now it is possible:
- to disable Help buttons and jumping to external website of Online Help (--without-help-url)
- set the icon theme of tunneled dialogs and sidebar (--with-core-icon-theme=<theme>)
- set the list of allowed dictionaries (--with-dictionaries=<language list>)

This patch obsoletes the packaging hacks that we had to use for certain customers.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I450f66ac133f6fcefae2bda9f29e04405ef3a6b7
2021-05-18 09:14:00 +02:00
Tor Lillqvist
c98e9962db It's trace_event, not event_trace
Change-Id: I54db3bd41b54fcb869f048f3581a6545e24cfd4b
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-13 12:35:55 +03:00
Tor Lillqvist
fd1910c727 The Chrome format is called Trace Events, not Event Trace
Change-Id: I2515182d9369c3a25727dce0d3790e79de891bff
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-04 15:12:14 +03:00
Tor Lillqvist
be476d23b3 Produce a Chrome Event Trace file
It is (for now) produced (by the ProfileZone things in core) whenever
logging level is "trace". The Event Trace file pathname can be given
in the loolesd.xml file or on the loolwsd command line.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6d5829121e71460a4600ee94d2ebf51043c8893f
2021-05-03 16:09:35 +03:00
Andras Timar
1d3c553e51 cosmetics: tab to space
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib0d019a79f3739080bb5fdd78bfbcb39b6ee2c0a
2021-04-15 11:31:43 +02:00
Gabriel Masei
21d514ecff admin: add support for lost kits cleanup
Signed-off-by: Gabriel Masei <gabriel.masei@1and1.ro>
Change-Id: I31969196aa138b6da964c867679ec23f34c89fd0
2021-04-01 22:09:44 +01:00
Ashod Nakashian
5cffde8734 wsd: limit the maximum PDF rendering resolution
Rendering PDF documents to images can consume
large amount of memory. Here we limit the
maximum allowed resolution to 384. This is
about 400% zoom resolution, given that the
100% resolution is 96 dpi.

If this proves limiting, it can be increased
to 480 dpi, which is about 500% zoom scale.

Change-Id: I719118d517bbaf8b204411223f1e26a31b97ca99
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-01 15:54:30 -04:00
Ashod Nakashian
c323da92d1 wsd: support configurable PDF rendering resolution
The defined envar is used by Core to override its
default resolution (of 96 dpi), when specified.

Change-Id: Ie7164e78f98990ac88b02dbfe2becbae8c134e9c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-04-01 15:54:30 -04:00
Henry Castro
1df271b363 config: add "macro_security_level" item
"Level of Macro security".

Change-Id: I491648f2a89289c7f4455dfad76d73ac8449b965
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-12 08:23:56 -04:00
Henry Castro
50c0fc4492 config: add "enable_macros_execution" item
"Specifies whether the macro execution is enabled in
general. This will disable Basic, Beanshell, Javascript
and Python scripts. If it is set to false, the
macro_security_level is ignored. If it is set to true,
the mentioned entry specified the level of macro security".

Change-Id: I4bc5b690268a93994d17e2b02b7b60b6398646b7
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-12 08:23:56 -04:00
Michael Meeks
6307f1ee3d Allow jwt token expiry to be configurable.
Change-Id: Ifd2b078adfa3106765f5b54c0397e04ab66fc804
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-05 18:33:09 +00:00
Miklos Vajna
78f192399d Revert "wsd: disable ssl by default, enable ssl termination by default"
This reverts commit f6bf6f49ed. I did not
consider that this makes it harder to do a local developer setup with
reverse proxy + make run; also that if you don't read the doc to set up
a reverse proxy, then the default now serves http content and advertises
https, which is not helping sysadmins.

This needs more thinking how to improve one scenario without hurting
others.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic789faa2dc5bb19a79d651dc81d4eaaf0b48607a
2021-01-14 13:59:44 +01:00
Miklos Vajna
f6bf6f49ed wsd: disable ssl by default, enable ssl termination by default
The intention is to have defaults which are close to how people
typically use Online in production.

However, keep using ssl for 'make run', so that the https environment in
the browser is unchanged.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I7fd725a83b0e9ca1012f2c0e0c3bf038e5fa0059
2021-01-13 13:33:44 +01:00
Andras Timar
3f81bfd987 Add /var/log (default log path) to ReadWritePaths of loolwsd.service (fixes GH #739)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I47e8a0983fd74656739498bf02bad117e821cfbf
2020-11-20 20:19:43 +01:00
Andras Timar
f4e52a81d8 The non-implemented WebDAV host was cleaned up, so let's kill these references, too.
Change-Id: Ib677fd35c9a2a1d72f2d8b4de0d37f92c691dded
2020-10-07 18:41:43 +02:00
Yunus Bulut
35ad7d4265 Destroy WebDAVStorage and <webdav> section #169
Change-Id: I7ce095f722599a37b82e8789baeb6145028dd10d
2020-10-07 14:55:26 +03:00
Andrea Gelmini
9d01540680 Fix typos
Change-Id: I7d487f32ca43e19023760ef3c6bb1683607f93d1
2020-10-07 12:51:08 +02:00
Ashod Nakashian
c5f9d605e4 wsd: make outgoing connection timeout configurable
The default Poco connection timeout is 60 seconds,
which is probably excessive. The current configurable
default is a more reasonable 30 seconds.

Currently we set this timeout on Storage connections
going out (i.e. WOPI connections).

Change-Id: Ie80a9141ca9bf721addc74baf94e62e0ad72fdd2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98913
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
2020-08-11 20:11:14 +02:00
Ashod Nakashian
5c9988f2e3 wsd: faster jail setup via bind-mount
loolmount now works and supports mounting and
unmounting, plus numerous improvements,
refactoring, logging, etc..  When enabled,
binding improves the jail setup time by anywhere
from 2x to orders of magnitude (in docker, f.e.).

A new config entry mount_jail_tree controls
whether mounting is used or the old method of
linking/copying of jail contents. It is set to
true by default and falls back to linking/copying.
A test mount is done when the setting is enabled,
and if mounting fails, it's disabled to avoid noise.

Temporarily disabled for unit-tests until we can
cleanup lingering mounts after Jenkins aborts our
build job. In a future patch we will have mount/jail
cleanup as part of make.

The network/system files in /etc that need frequent
refreshing are now updated in systemplate to make
their most recent version available in the jails.
These files can change during the course of loolwsd
lifetime, and are unlikely to be updated in
systemplate after installation at all. We link to
them in the systemplate/etc directory, and if that
fails, we copy them before forking each kit
instance to have the latest.

This reworks the approach used to bind-mount the
jails and the templates such that the total is
now down to only three mounts: systemplate, lo, tmp.

As now systemplate and lotemplate are shared, they
must be mounted as readonly, this means that user/
must now be moved into tmp/user/ which is writable.

The mount-points must be recursive, because we mount
lo/ within the mount-point of systemplate (which is
the root of the jail). But because we (re)bind
recursively, and because both systemplate and
lotemplate are mounted for each jails, we need to
make them unbindable, so they wouldn't multiply the
mount-points for each jails (an explosive growth!)
Contrarywise, we don't want the mount-points to
be shared, because we don't expect to add/remove
mounts after a jail is created.

The random temp directory is now created and set
correctly, plus many logging and other improvements.

Change-Id: Iae3fda5e876cf47d2cae6669a87b5b826a8748df
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92829
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 05:42:43 +02:00
Szymon Kłos
3141bf7775 notebookbar: Introduce switch in loolwsd.xml
Change-Id: I94546a899fde1cecc2c35dc527e41e8a36061750
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93050
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-30 08:16:25 +02:00
Andras Timar
faf9ccbd0a Add LOKit logging option to configuration file
Environment variable in sysconfig.loolwsd was not good, because:
1) it was a systemd antipattern
2) this systemd environment file was not present on all distros
3) we had to take care about this separately, when we did not start
   loolwsd from systemd

Change-Id: I5c47668ca388c2f4b0afd6da8c575a3fb3cfab3b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96291
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-15 16:06:37 +02:00
Gabriel Masei
ac17984226 admin: cleanup resource consuming kits
Change-Id: Ifafbadc61b788adc90c03fb92e0231f9e599c360
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95794
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-06-09 11:25:44 +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
Michael Meeks
92eff552a5 Lower convert-to process priorities by default.
Interactive / editing processes should take precedence over batch
thumbnailing processes to keep responsiveness good.

Change-Id: Ib100409e312cb2ca545586a734711a31a92f110c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93323
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-05-02 22:03:36 +02:00
Michael Meeks
f9f392ab5c Storage: add as_scheme to allow auto-determination of whether to use SSL.
This is the new default - do as we're told by the client.
The old setting is left to allow users to force SSL if they are
concerned that they may receive unhelpful URLs.

Change-Id: Idea83aacea6826a8f37264e34d49c7550efe6d27
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93179
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-04-30 14:53:25 +02:00
Andras Timar
6ad6028b91 add more info to description of storage.ssl.ca_file_path setting
Change-Id: I35ad72be99635fcc11d552072b52ffbd45ba3044
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93036
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-28 15:39:15 +02:00
Muhammet Kara
f507302993 Welcome: Add config for enabling the dismiss button
Change-Id: Ia2fbf066493d91a2b10866e66d11332b5cfc10fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92593
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-04-20 20:35:08 +02:00
Jan Holesovsky
f004090201 Revert "Welcome: fix the default path of welcome message"
This reverts commit df4a241d0f.

Reason for revert: As we agreed, we have to improve the default,
but this patch actually just doubles something that is working
out of the box.

Change-Id: Idc22dabc3621d537f1bba3bc3b13a7d943c80c36
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92299
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-16 13:25:23 +02:00
Andras Timar
df4a241d0f Welcome: fix the default path of welcome message
Change-Id: I4661c005e8c284a16c708ee26d7922f5789c3e04
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92344
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-16 12:44:03 +02:00
Jan Holesovsky
0ec796dbee Welcome: Add ./configure of the welcome message default.
Change-Id: I090c7d657d2b0a696117f64f25c11ffb249fb272
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92277
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-04-16 11:36:00 +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
Michael Meeks
fa14102b3b Restore Javascript protocol logging.
If you don't want protocol logging by default in debugging builds
then either poke loolwsd.xml:

<protocol type="bool" descr="Enable minimal client-site JS protocol logging from the start">false</protocol>

Or - configure with --disable-debug and --disable-debug-protocol.

Also remove redundant and unused co-ordinate parameters to the
message queue, and logging.

Change-Id: I489e32ef4758a6f0ef35c8d8d322a402a3e268e6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91096
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-26 19:35:04 +01:00
Andras Timar
d04e1f4bd7 tabs to spaces
Change-Id: I8feb0f88e50c31ece6247b6f1c940b5cef8ed420
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89853
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-03-02 21:54:36 +01:00
Aron Budea
dff1d32624 Default redlining_as_comments config to false
For better performance, many comment boxes reduce performance in
browser.

Change-Id: If041c3d147ee7512d90f41a4a1bfe7a1ff8646a9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89065
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-20 04:59:07 +01:00
Andras Timar
e24eda5d64 tdf#129928 add a comment
Change-Id: I3e9714445b8144445d71113450827dd72bcf0ba5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88441
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-12 11:20:01 +01:00
Eduard Ardeleanu
3ca4d27957 Update per_document loolwsd settings
Remove obsolete settings: limit_virt_mem_kb, limit_data_mem_kb and add entry for setting limit_virt_mem_mb

Change-Id: Ieda5bdc9078f94ab2269d96092d7718b068f4fc7
Reviewed-on: https://gerrit.libreoffice.org/85288
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-17 12:19:56 +01:00
Michael Meeks
83e02ab38b Add a time limit for badly behaved / huge document conversions.
Handles problems with load, save, and lingering DocumentBrokers.

Change-Id: I6079cba3a4fa2a84c303b3a8669d94863a04f474
2019-12-12 03:38:50 +00:00
Ashod Nakashian
70b8939688 loolwsd.xml: improve the description of server_name
Change-Id: I002d09e8bcccdea64eec3c804615ce678e4bb0e4
Reviewed-on: https://gerrit.libreoffice.org/84712
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-12-08 21:14:54 +01:00