Read only sessions cannot modify the document, so
we shouldn't consider input from such a session
as potentially modifying the document. This
becomes important during an abrupt disconnection
where we look at isPossiblyModified() as an
indicator for data-loss.
New unit-test that reproduces the corner-case
with disconnection. With graceful unloading
a previous unit-test verified that it worked
as expected.
Change-Id: Id84cda4f4599c559018247c32ea1205e154e4984
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
wsd/ClientSession.cpp:520:32: error: implicit conversion from 'uint64_t' (aka 'unsigned long') to 'double' changes value from 18446744073709551 to 18446744073709552 [-Werror,-Wimplicit-const-int-float-conversion]
(counter < (uint64_t)(std::numeric_limits<uint64_t>::max() / 1000)))
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Which is a problem since commit e0b70657fa
(cid#318912 Result is not floating-point, 2023-08-23).
Let's make the conversion explicit, hoping that makes both Coverity and
clang happy at the same time. No change in actual behavior intended.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib9727f0df4df65a9504d421654d519bee0733b80
- regression from ec17f72fb5
- also removed the restriction to have "static" in unlock_image
url
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ie4f1170fb6a12db5218fb28f21d78f88ebc61d56
- original auth command shutdowns the socket connection
if the token is invalid
- in controller's case we just want to verify the token
for adminClusterOverivew socket connection
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I2e640a746c839ea6f4494ddbdfcb8f924150906f
perf reported 6.58% of time in collaborative multi user test
on 2023-08-24 was spent in TileDesc::parse and much of that
in std::unordered_map.
There are only 12 arguments in the map we care about here so
we can just used a sorted array, look by name on write, and
read by index.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iadfc2001e298d8f4d46200c8488f0eb4cd8734c2
we presumably want the current behaviour so silence with
an appropiate explicit cast
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibed4cb2cc31b26195e407f25f7f0a2ea7172c67d
Document that authentication changes need double amount of care,
compared to other normal functional changes.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib1820581f7175957f08f5e080d542c7441a3ffa2
With the use of a single flag for both, the
logic is now less ambiguous, as we cannot have
termination flagged without also implying
shutting down.
The assertions are no longer needed.
Now that setting the termination flag
explicitly implies having the shut down flag
as well, the checks are simpler. We only
need to check that the shutdown is not set
to continue running as normal, since having
the termination flag must perfoce mean shut
down is also set, there is no need to check
both.
Change-Id: I99e22f5668385182b0594040a8e3354b55e74642
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We need to allow loading media sources from
the web-server URL. This seems to be necessary
at least on iOS.
Change-Id: Ic7b23c4f80b975460de9311a67f3c5cb51758d14
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
map is never null so make it a reference
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9f6ad863d0a1102dd7e26a5668b1c6ba71249580
To avoid confusion with the WOPI access token.
.
Change-Id: Ie38e0f11d0655e89eb1c7f1e20b73a9b8756ba21
Signed-off-by: Henry Castro <hcastro@collabora.com>
- refactored special case for templating
adminClusterOverview.html
- removed useless variable
- format the code, fix indent
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib22cb481db7c7ef94b11f3044d0cd856e6d0eed5
- added DlgLoading class to show loading modal dialog
- upgraded the d3
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I8bd99bbadaa59a7de1e83bebde8db0dce920705d
multiple cool servers
- also good to check response first as client
might use persisted cookies
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Idcd85266a4cc5020aeaca7d7fb8428bc0a3d7d32
and bundle them together when emitted from the browser-side
// i.e. FIXME: new multi-tile-processed message.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I69916cbe30c26686fb44a2d8d229704c459b6601
std::make_shared and std::make_unique
are superior to explict smart pointer
construction. Where we have private
constructors, we can't use them.
Change-Id: I492122f58e958113c6e6d31445c6614ad98c89aa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We have http::Response specifically for
this kind of thing.
Change-Id: I57130754f95c06f5ab958ca373f21763e74cb6a2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The access token will validate the session
when a websocket is connected to the server.
Change-Id: I008b04a499ab0d85fd6f95fc06a511f800c0bb2e
Signed-off-by: Henry Castro <hcastro@collabora.com>
We don't want to dump the whole paste buffer as hex, or indeed any
large mis-encoded string - instead crop to the problematic section
for easier debugging, and no performance hit.
Change-Id: I30518beea436895a42b3429c3cb6e16e2093cca9
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
problem:
till now we used values from DOM elements which were unreliable,
sometimes they are not discoverable due to nested iframs.
That threw some 404 due to incorrect theming path.
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ibc291ce9f64db799095e1edcb14c598bdd085de7
* simplified the tooling a bit: use coolconfig for creating
RSA key pairs for WOPI Proof headers.
* got rid of a dependency: ssh-keygen, towards leaner docker images
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iaf468b5c8585d45027f512bb0a287ab77afb1ea9
Also: address parts of #6897, primarily:
* remove the problematic aspect of bumping the last wid in our
TileData, when this could trigger a re-send of a previously
sent delta, causing tile corruption.
* instead append an empty wid entry.
* as an optimization - if the last entry is empty update
the wid - since re-sending an empty delta is of no
concern.
* simplify a number of code-paths that special-case zero length
deltas. All deltas now commence with 'D'.
* still track updates in the JS - by detecting empty deltas.
* shares more code and simplifies various paths.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I02af6d4b152524c201b6985b7a3497da7f08a517
However, don't force rendering a keyframe, only sending it - other
clients may be happy with deltas. This is to better handle:
window.app.console.debug('Unusual: Delta sent - but we have no keyframe for ' + key);
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4efff0f6b1d2817e6b8bd567eb3b098383a1ef42
Revert "Avoid crash when pasting image in debug mode"
This reverts commit 78558fe9af.
Instead of detecting paste command and not trigerring assertion:
fix frame type so it will be binary in case of paste.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If5c726463459be7eaffae1522df522dfa1d74443
Disable the 'forceKeyFrame' for tilecombine messages from the client,
we have a larger cache now and it makes sense to honor and track these.
forceKeyFrame was signalled with a zero oldWireId - which is the default
if we don't have it set.
Change-Id: If96423e96f8dc578a634ed5093517dfa6702cc1b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
We normally throttle saving and uploading to
avoid hammering repeatedly, but when unloading,
we reduce said minimum wait by a factor of 10.
This allows for a quicker unload cycle, esp.
if we had just saved before unloading, or
if there was a previous failure.
Change-Id: I8710c9b86c05254ad9b9735d8496dd96900221e2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>