Commit Graph

222 Commits (c4975d01e591e51dbe2f32bb75af27a5575e1122)

Author SHA1 Message Date
Aron Budea c4975d01e5 Split config.h into separate headers to avoid extensive rebuild
Eg. if only the version was changed, config.h was updated, and
everything was recompiled.

New structure, maintain these manually:
config.h.in - for configured variables that are stable if
              configuration parameters are unchanged
config_version.h.in - for version/hash related variables

----
config_unused.h.in - still generated by autoheader with all
                     variables, don't use it

Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: Id9a50a9f1e798a3b3814778d8683b7d7cb57bb29
2022-09-05 12:32:49 +01:00
Aron Budea 81e1e0a51e wsd: slightly improve logging in case of version mismatch
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I586da3390487727f0d4b743d4d285cce59f7d55b
2022-07-25 06:23:19 +02:00
Henry Castro c9178b0223 Add home mode option - enabling more configurability for CODE.
Requested by several users and partners - defaults to off/un-changed.
When set it allows optional disabling of welcome/feedback when used
in a homely environment.

Also bump default max doc/conneciton limits in configure to 10k.

Change-Id: I3c917901e02445d45f6f86b554d47a60aa4e575d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-07-14 18:24:43 +01:00
Henry Castro ee408c1f19 wsd: remove unused welcome code
clean up unused code

Change-Id: I2080942bed0403d3767f282c36c554e7b8bf03ca
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-07-11 14:19:00 +03:00
Andras Timar fb25b7d806 If integration theme does not exits, fall back to default theme
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9939ee243aa81b50969168df2e8bb5c8cbf2a34c
2022-07-11 12:59:05 +02:00
Henry Castro 39586d1631 Revert "wsd: add fetch external method"
This reverts commit 19ed2aa2b4.

Change-Id: I6b6762c0a7bf74dd358fcb7a4239abc37c92bd18
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-06-27 16:04:32 +01:00
Henry Castro df1ce42fa3 Revert "wsd: add indirect request logo image"
This reverts commit bc7f16fa5d.

Change-Id: I36ca708e61dc6a2423ddd2b74881f43f4eb97fc9
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-06-27 16:04:32 +01:00
Henry Castro e3442e49ed Revert "serve lokit-extra-img.svg with integrator theme, too"
This reverts commit e99afdf83d.

Change-Id: I44dfd2d49d8f9fe9ab1b9bca51b58e2a04246e3b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-06-27 16:04:32 +01:00
Andras Timar e99afdf83d serve lokit-extra-img.svg with integrator theme, too
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia79a607ba244df56c3db1892376dce2372d127df
2022-06-13 14:23:56 +02:00
Henry Castro bc7f16fa5d wsd: add indirect request logo image
Change-Id: Ib02cdcfffa3fa09654def787844c7f3dbbef50a9
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-06-07 15:42:53 +01:00
Henry Castro 19ed2aa2b4 wsd: add fetch external method
After file server has been initialized,
it fetches external logo image.

Change-Id: I5d47287d5fa875c3e5825567d4ff284abe2ff500
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-06-07 15:42:53 +01:00
Henry Castro a3d0920e18 wsd: infobar: clean up unused code
No longer used.

Change-Id: Ifdaaabc49df1b9af0fb4d436ffe2437446f5926a
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-12 18:25:10 +01:00
Ashod Nakashian 757529aad2 wsd: cosmetics
Change-Id: I85773b4c06c051ee8c52c353e26dd6149c7843de
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-06 14:45:34 +01:00
Rash419 0945c4d48b config,UI: change classic -> compact and notebookbar -> tabbed
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I633a13927245ee6b4d750cd84c2b4577dca06d68
2022-04-25 13:56:10 +05:30
Ashod Nakashian 480fb7b931 wsd: move tokenizer helpers into StringVector
In an attempt to reduce the size of Util.{c,h}pp
which has grown to contain all sorts of unrelated
helpers, we move StringVector helpers into
the StringVector.{c,h}pp files.

This makes the code better organized.

Change-Id: I152f341606807ae66253415b951bc9f89b09df57
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-12 07:39:07 -04:00
Henry Castro c550a206e8 Remove the old vex-based welcome dialog code
... and make Welcome dialog optional for COOL

config: add welome url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

config: add feedback url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

config: add infobar-url parameter

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: fix unhandled exceptions

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: preprocess welcome file

added welcome-message.html

Signed-off-by: Henry Castro <hcastro@collabora.com>

welcome: clean up code related to vex welcome

Signed-off-by: Henry Castro <hcastro@collabora.com>

--enable-welcome-message is not necessary, when we specify a welcome URL, then it is enabled, otherwise it's user configurable

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove the unused welcome config settings

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove unused define ENABLE_FEEDBACK

Signed-off-by: Andras Timar <andras.timar@collabora.com>

do not install/package fallback welcome dialog, when welcome feature is not configured

Signed-off-by: Andras Timar <andras.timar@collabora.com>

remove welcome-message.html

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I20aa6220362018b63aaebd114b2b661561823fbb
2022-04-04 10:53:07 +02:00
Michael Meeks 16386b9aaf Re-work welcome configuration.
Change-Id: Ia99eb5b587a849d32d7d4f392c15f84db2423e95
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-03-21 21:34:25 +01:00
Ashod Nakashian 140b4f9c08 wsd: minor improvements to StringVector::equals overloads
Change-Id: Ifa975e579392151bef422ff985a93abf3129dfeb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-03-21 08:57:41 +00:00
Henry Castro b614c83098 welcome: preprocess the COOLWSD_VERSION
to our welcome dialog

Change-Id: Ibef4c299ab50ad81f88009e7107638da12e425f6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-03-11 15:09:50 +03:00
Henry Castro 3bffee13bc wsd: pre-process the welcome.html file
Change-Id: Ib20bb3b5bf4affab42d31acd50030da66537b801
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-02-24 19:15:35 +03:00
Alexandru Vlăduţu dc0b02da4c browser: add option for grouping the download as icons
Signed-off-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Change-Id: I3c8c1964879bec8c4e31a85baefb7b442ceae29f
2022-02-24 15:22:22 +01:00
Ashod Nakashian c9f8edc08a wsd: const correctness and minor cleanups
Change-Id: Ic3dd918e371f74ac59684f09f0b4f5bc0a7b9b0a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-24 07:38:13 -05:00
Ashod Nakashian b53d353779 wsd: reduce debug and generally redundant logs
In 'debug' log-level we expect a detailed, but
still readable output. Having one area with
disproportionately large number of logs reduces
the overall utility of the log output.

This patch reduces a number of redundant log
entries, including errors that are already
logged. It also reduces the level of some
others from 'information' to 'debug' and
from 'debug' to 'trace'.

The goal is to make 'debug' level as useful as
possible to read the progress and be able to
understand what was going on, such that one is
able to decide which area to dig deeper into.
Then, trace level could be used to get more
insight into that area, if necessary. For
example, when investigating a test failure,
one first enables 'debug' logs and reads through.
Once a section between two debug entries is
identified as being of interest, enabling 'trace'
level logs becomes more productive as it's
now possible to easily reach the first DBG
entry and read through until the second one.

It's unfortunate that we don't have per-area
control for enabling/disabling logs, so it
is common to see more and more 'debug' log
entries added all around, making logs
less and less readable.

It is also a limitation of the levels we have
that we really only have 3 usable levels:
one, two, many. That is, 'information' for
the most important events, 'debug' for
technical details needed to investigate issues,
and 'trace' for everything else. ('warning'
and 'error' aren't really 'levels'; they have
semantics that makes them special-cases.)
So we have to avoid degrading one into the
other, or have differences without distinction.

If any of these entries are needed to be
displayed more frequently, changing them
back to 'debug' or even 'information' should
be done. Though for me they seem special
cases that don't benefit most log readings.

Change-Id: Id2c6a9dc027483b81a066b0b4b50a298c5eff449
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-24 07:38:13 -05:00
Henry Castro d056c872f5 wsd: fix missing port number
use Uri::getAuthority():
"Returns the authority part (userInfo, host and port) of the URI. "
.

Change-Id: I8c63a4c00cc1ad199f6f0cfd15f4e42fac4e7aaa
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-01-26 16:46:06 +01:00
Henry Castro ee67cd4f44 wsd: use getHost to allow CSP frame-src
It will be used to update server check versions

Change-Id: I3acadb575bdcc99daed4c68881d3f35da999a22c
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-01-26 16:46:06 +01:00
stellarpower b05b8e77cf Add more detail to error logs.
We get a syntax error message in the logs - but have no indication as
 to what in the config file caused this issue. Bringing back both more
 detail to the browser and logging the extended details.

Signed-off-by: stellarpower <5004545+stellarpower@users.noreply.github.com>
Change-Id: Ib8ddb20a1968f879558e59f50579ee4b18db0f09
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-01-26 09:09:56 +00:00
Pranam Lashkari c5f2c5e174 theme: added config flag to switch between integration and cool themes
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I679328e29f2e2297491c73249632627d01a1bf42
2022-01-25 12:09:01 +05:30
Szymon Kłos a3c5c71107 RTL: Serve html with correct RTL settings
In case of RTL users we want to switch UI to that mode
early so we don't see flipping in the browser.
Setup correct setting at the serving html step.
Using that approach we don't need to extend LOK API.

We detect that using "lang" parameter passed in the request.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iaa2962b01f218cae68a6dfd168bff4dbdae94c8a
2022-01-11 21:40:54 +03:00
Ashod Nakashian 777858e617 wsd: add hsts header with config
Change-Id: I16955edd09cf68e995294055ea2cb3f458b3ba38
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-01-10 21:26:38 +01:00
Szymon Kłos f3d2aa4be0 Use correct formatting for string variables
- when reading from config use correct type so SyntaxException
  is thrown when we type non-number into uint field
- handle SyntaxException and send 500 so user will get response
  (previously we left request without response until timeout)
- log about incorrect value in the config
- simplify repeated bool -> string conversion after config read

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1c50de263ffdb1d97eb9381754bc7cf3bd05dbfa
2021-12-11 21:58:34 +01:00
Ashod Nakashian e4195cf592 wsd: allocate temporary buffer dynamically
Change-Id: Ic1fda50016a141c30fb710c3356292ce4d6617d7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-11-24 20:11:07 +01:00
Jan Holesovsky b4f588ea3c Add a value "default" for the user interface
To be able to override it by a new package version, if necessary.

Also, when explicitly configuring the "classic" or "notebookbar", make
it override what is provide in UiMode.

Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Change-Id: I4b9764b32ce712d8bfd46ef90d9c8538fcaf921b
2021-11-19 16:08:44 +00:00
Rash419 f815ff459b wsd: fix: don't use hardcoded PostMessageOrigin
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I72da1c8e3cfea0d4984c80b6dddd3e39af020bee
2021-11-19 14:08:16 +01:00
Andras Timar 5ffcd450a8 rename: add compatibility for existing integrations
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I013a042b47906ab48a0d02de422982dd8a6c85e4
2021-11-19 11:21:22 +01:00
Andras Timar f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00
Mert Tumer 78ccaa845e rename: loolconfig -> coolconfig
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ied23cb46a668f754931fc125745b674b546a0195
2021-11-15 22:07:53 +01:00
Andras Timar e1c1946afb more descriptive name of a config setting for debugging: browser_logging
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I175e5256fcae42477cb2c84fc2b4048aca40bed7
2021-11-11 13:26:37 +01:00
Andras Timar e58053621a Remove config option loleaflet_html
This means that we will no longer read loleaflet_html from old config files, which is
a good thing in 99.9% of the cases, because it contains a wrong default: loleaflet.html
For those integrators, who used this setting, we will offer an alternative slution later.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia82f812a5d3e522a9d33e7fcafcaa45130312d60
2021-11-11 12:22:41 +01:00
Henry Castro a21198a7c3 wsd: more variable renames
Change-Id: Ie2cc3d63c9de4e84d125f25d9ad4f779aafd6cb4
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro 8a4b111e8f rename var LOLEAFLET_LOGGING to
COOL_LOGGING

Change-Id: I155a829b3ad947e03363e5020aa71a104aaa8c00
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro 481da0e8ac wsd: rename loleaflet -> browser
Change-Id: I9108467012078f98f8853784359b98e49b398a5e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro 0fd562881c wsd: update comments
rename loleaflet -> cool

Change-Id: Ife79f691964e8874bcfe49af79bbf78ce16a2816
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro e0fe47be5f rename loleaflet.html -> cool.html
Change-Id: Iaa28f1269f8192755ec323396ae4ff054529f412
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Rash419 1836bbd5e6 debug.html: fix: opening a file using the full test URL in a make run build often gets stuck at Initializing
here full test URL mean, first you take the URL from the console, open it in the browser, then take the URL from the URL bar, close the existing session, and open a new one with that URL

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I4b4e59721fb1deec709bc778a8e59a52fb466a3a
2021-11-08 11:56:20 +05:30
Michael Meeks 1444ac7251 Add a version suffix configuration option.
This allows people to perturb the etags for now, and in future the
URL sub-path to make it easier to develop with binaries where the
git hash doens't change.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I6082a71cde5d3a34cca29fa5858feaf6fdb7f4d6
2021-11-04 14:02:03 +00:00
Julius Härtl 5162f91eca Keep branding theme dynamic
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: I07c952d10d50a38dd43369f5db6db41a2a4f32a0
2021-11-03 21:25:01 +01:00
Ashod Nakashian 4d897435a5 kill reuse_cookies
This remove reuse_cookies as a setting and feature
altogether. It was originally a workaround to aid
with authentication, prior to having access_token.
However, it proved to be less useful than originally
anticipated, primarily because cookies nowadays have
security restrictions in browsers. In addition to
the fact that access_token simply deprecated it.

While the documentation has also been updated,
tests still have reuse_cookies in input data.
This is intentional to ensure the code is
backwards compatible with any deployment that might
still pass URLs with reuse_cookies around.

Change-Id: If214b299b34a910face8cabc7c1335621990c85e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-11-02 08:45:00 -04:00
Julius Härtl 3eab4f70a2 wsd: Only add one img-src rule to the CSP header
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: I8ac3f077e4537f92943fa57bf863129d9bc36c6f
2021-11-02 11:06:19 +01:00
Rash419 d9795fff2e wsd: use the WOPI protocol for local files instead of the current "local storage" (in debug builds)
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I9e21df4c5b611ca9989915180310f0991ed28725
2021-11-01 15:45:14 +01:00
Pedro Pinto Silva 352d1d1f40 Allow one more url source for images
By adding this img-src to the content-security-policy it
makes possible updating images from a dialog without requiring
updating Collabora Online

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3ca8934c3e6eb0ee78a36a483f45eaf5649c84d5
2021-10-14 19:15:07 +01:00