Parse jsdialog responses, and send the right dialog id
to click items on.
Adapt to unexpected multiple updates for the corrupted document
warning dialog on load.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I0f934cdc60b2204afc493cf367f98a9cfa0aa6c0
Kit's GlobalCallback has an alarming habit of enabling
inputprocessing during a jsdialog popup occuring during
load, so use a stronger heuristic to avoid sending errors.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4a57685dcf63b4a3607c894e80a13e27bffaece5
Removing the prior apparently fragile approach of summing
view-ids.
Instead check for lack of duplicate view-ids, and still
load & close lots of views in random orders.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ibcefc54597cc4e37a9728dab2f32002620b01c4c
Adapt checks for empty or non-empty timestamps so that we can
match previous failures, and ensure coolwsd is sending us the
right override state.
Change-Id: I604e3aa0315753ae02e5a6e4173d6b3b3ffa3b3e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
config.h should be included as the 1st line in each source file.
It should not be included in headers.
config_version.h which changes on every commit should not be
included widely - so remove it from the HttpRequest heeader to
save tinderbox's ccache.
Fetch version info from helper methods rather than in-lining via
defines, to better encapsulate.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If449a36f1ac61940f04d70d5f4180db389d9b4c4
For some reason, the exoticlocale test takes
significantly longer to load. It often times
out when the CPU throttles or when it's
too loaded. Extending the timeout eliminates
the issue for me (no timeout over 175 runs).
Change-Id: I07cb099776af38206c0567f603cb6cc424eb0b93
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We should always have an encoded WOPISrc.
We add detection logic to make sure
that all URIs that contain WOPISrc have
it encoded properly. We do this by
comparing the decoded WOPISrc with
the original URI.
Change-Id: Ia0c2a79b009ce105321ad35db3d4f81006e81cb3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
WhiteBoxTests.cpp:660:10: error: 'updateActivityHeader' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
void updateActivityHeader() const
^
../kit/ChildSession.hpp:89:18: note: overridden virtual function is here
virtual void updateActivityHeader() const = 0;
^
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I12f21fd9fbe0ba77d2196bfcd1cbdb5ef07e5d06
Cue up some basic state for being signal safe dumped on crash/abort.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ibc6713aef2a0e7b878b178b05f0e13c8d40b47fc
so remove one in favor of the other
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I47778f7bce24f0687565aa179b7a3bbea9d95120
Probably went wrong with bf8b9945ab304c3c4604ff296ff33b3f127accf7 (Warn
on non-async dialog usage when in debug mode., 2024-01-26).
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ifb92e0d9431f252cdf26ac92dd428b87e5d6e8e0
Add a way to search with an offset in findInVector() and then we can
avoid strstr() which assumes a null-terminated input, which may not be
the case.
READ of size 55 at 0x606000068a56 thread T8 (docbroker_001)
#0 0x55d0d6718a5a in StrstrCheck(void*, char*, char const*, char const*) /home/abuild/rpmbuild/BUILD/llvm-15.0.7.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:652:5
#1 0x55d0d6718882 in __interceptor_strstr /home/abuild/rpmbuild/BUILD/llvm-15.0.7.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:669:5
#2 0x55d0d71872c9 in ClientSession::postProcessCopyPayload(std::shared_ptr<Message> const&)::$_4::operator()(std::vector<char, std::allocator<char>>&) const /home/vmiklos/git/collaboraonline/online-23.05-san/wsd/ClientSession.cpp:1631:31
During unit-uno-command.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id42669d912bab4746d9f7d99a192c4c3f1d175f7
This class will be responsible for faster
variable replacement to serve the templates.
Change-Id: Ic0d75b0a197c0db75c0988c3b6af400a5b1c35a2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
But re-write them anyway to be more sensible.
Change-Id: Ie146f4f84b539ab7e826a1c1b947497acde7e384
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
The JS code does the same at
browser/src/layer/tile/CanvasTileLayer.js:3074.
In preparation of picking core.git
51d8a2ef54751403fa707816e27ddb4e7faa8231 (cool#7492 sfx2 lok: fix bad
view id / statusbar string on async binding update, 2024-01-08) to
core.git co-23.05: this online.git commit should go in first to avoid
breakage.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I652e5c738b7e137970a820de2d71f9c03ba6df7e
When always_save_on_exit=true we should
still not upload the document when it
isn't modified.
In this case, because we now always
save the document (forced) when
always_save_on_exit=true, and because
saving always generates a new file on
disk, with a new timestamp, we couldn't
detect that there are no modifications.
We now still force save, but ask Core
to skip it if the document is unmodified.
This is safe since we now always issue
the save, but rely on Core to do the
right thing. When the document is saved,
we do the normal upload as in that case
we know we have a new version of the
document, which must be uploaded.
Worth noting that the closedocument
command doesn't trigger the same path.
To reproduce the issue, we need a new
test that disconnects, instead of the
graceful closedocument command.
Change-Id: Iaa4e0363ed2eca124f2d1943393e65c0c187aa18
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This forces autoSave when always_save_on_exit
is true. This is needed so we can guarantee
that we don't have modification and that
we upload if there has every been one.
The latter case is checked in
DocumentBroker::needToUploadToStorage(),
which is called from
DocumentBroker::checkAndUploadToStorage().
A new test reproduces the issue and defends
the fix.
Change-Id: I0b2105a57cfd7049ba7b1f63e62a700fdc3744c2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Let clearOldQuarantineVersions() remove quarantined
files only when necessary and per the config settings.
Change-Id: Ie1fb18c02d61a710546e9b5962ab8b7973c2066e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We now use our http::Response in HttpHelper::sendFileAndShutdown.
Change-Id: I77503fce7a66a11435bad896d3d5d6df611544be
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Since we don't want to propagate Poco types
as well as our pair containers, it's best
to have these are named functions rather
than as operator<<.
Change-Id: I9772b8f314262147b6c445464bf3ce8cb598b56d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This removes the literal string comparison of the
received http header with proper parsing and
comparison.
Change-Id: I383794aa1dc791632ec9d5ed2191880a57d457ee
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Since we already have an http response instance (in all but
one case, prior to this change), there is no need to pass
the mime-type explicitly to the sendFileAndShutdown
function, only to set it on the http response.
There are already too many arguments and the mime-type
is surely redundant.
Change-Id: Iab64074dc111573b87fb8fa9b907c26a4160910c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Unfotunately, if our custom test driver run_unit.sh
fails, the report isn't generated at all.
So, instead, we have to go back to parsing the trs
file to detect success and failure.
We now make fast-fail an option instead.
Also fixes a typo in run_unit_standalone.sh.
Change-Id: I337c2a3edceda01df5f9c13c83eb176930b07e34
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
with the original 25 expected results from 25 requests
from cid#318925 Structurally dead code
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I236876fadd5b5c82ecdbcc52a13fc58e8513aa12
for coverity always assert even if a previous test was to fail
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ic48654d828a5311e043f412d9c30139e25b40262