The modified status is normally broadcast to all
views. This works fine, except with async disonnection.
With two views, one inactive, if we disconnect both,
we cannot know which disconnection will be processed
first. Depending on the order, the second one
will be used for saving. If it is the inactive user,
we will never see that the document has been saved
successfully, because we would have the modified
flag set to true and the message that updates
it to false (after saving) will be dropped.
This scenario was reproducible fairly reliably
in HTTPWSTest::testSaveOnDisconnect.
Here we make sure that we pass-through the
ModifiedStatus for inactive users as well,
since this flag is used for housekeeping.
Change-Id: Iac9ac5ee5f4bc4035587c8e34a756cddb5bddb9f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit ff32851738d4412e4a6e2de5380c17647b1a6fcc)
Based on previous crashes, it is useful to have more granularity
on what happened last.
Change-Id: If18a3a4d7817be23a6f8aadd301827a8e1bc007e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
This is too restrictive security measure, so turn it off for now.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I6f158ed4ed77f6508c9effbad5307d43e9e5461b
The path of the NSS certdb is defined in the coolwsd.xml config
file and if the config file is set and contains the certdb files,
then the db files are copied to the jail into /tmp/certdb folder.
Also the /tmp/certdb path is set to LO_CERTIFICATE_DATABASE_PATH
env. var, which is then used as the default certdb in LibreOffice
when LOKit starts up.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I72e8f28f27a0306fef9319bc6212cd99cb3f8212
Problem is, all save-as requests received urlencoded
but when it is a wopi request we change the url bit of the message
with correct path jail filename parts. At that stage it becomes decoded
already. saveAs in the core also decodes the url and thats why we should
re-encode it. But unless it is a wopi request it should be already
encoded and we should not re-encode it again.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I08b3a1cff6c3aa9271222c255f4a35aa5b984819
Appearently core expects encoded path for filenames on saveas
and decodes it at the end.
So if the file name is something like a%20b
and it becomes a b in the storage.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ib200c92859b4ab3f262cfe88747563c42e2c6a5c
removed support for parameter "type" which is no longer sent with textinput
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I97bb7e80fe9cc3bb0768fd37b0c15983310a538c
Core needs "notebookbar" ui mode string to activate
notebookbar widgets. If we pass "default" notebookbar
is not activated and style previews widget doesn't work.
followup for b4f588ea3c
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I758dee279c6da8b3fd41e5121f2eb2336539f327
With --with-sanitizer=address, a number of variables
get flagged as 'potentially uninitialized.
There are only a handful of these, so fixed.
Change-Id: I7ffc78b8cfd152a56ed81d97b5cd3660ce5b16b6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
jail-id is already used a sub-directory of each tmp dir,
so there is no more "information leak" in making the tmp directory name itself match the jail-id
further naming it with jail id helps in referencing that directory for hard linking when quarantining a file
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iaa635f44d1cd99571a9571113ce1cc92e203fddb
This prevents additional strings from being allocated.
Signed-off-by: Hugo Peixoto <hugo.peixoto@gmail.com>
Change-Id: I84b1e5cf4d11bf8512febe068b3097770b63dc5c
There was a pattern of calling Util::startsWith on StringVector
elements:
- Util::startsWith(tokens[0], "boo")
- Util::startsWith(tokens.getParam(token), "boo")
These two expressions would cause a new string to be allocated and
immediately released. To optimize this, a StringVector::startsWith
method is introduced.
This method works by calling compare directly on the underlying
StringVector string, avoiding creating a temporary string.
Signed-off-by: Hugo Peixoto <hugo.peixoto@gmail.com>
Change-Id: I6f27d5bb13783f39c7d4ce0644a11e57b0071244
This should take care e.g. for SharePoint user IDs, which have the
form of "domain\username", and the backslash must be escaped.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I75936070ad1661dc9b03e05a19b64159b0758018
Unfortunately the sequence message sent
from LO core is important, and the status
indicator finish should arrive to client side
before any dialog interactivity (i.e. Macros Warning Dialog).
However the LO core sends like 3 times status
finish for now we cannot duplicate them.
Change-Id: Ieee2ee93555b50b0e67507aae36096e10728a038
Signed-off-by: Henry Castro <hcastro@collabora.com>
This adds a new service render-search-result, which renders an
image of the position where, the search fund a hit. The search
result contains the information in which object or paragraph,
which is just the node id and node type from the document model.
The service takes the document and the search result (xml file)
as the input and returns a PNG image as the output.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Iffc158c5b0a3c9a63f8d05830314c9bc1616b3b1
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I12660822829c874179ccffd84dcdd33f5dde27e3
(cherry picked from commit 5a1c42c4e610a9265dfe3527c964413f029060ae)
Conflicts:
loleaflet/src/layer/tile/TileLayer.js
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ief814741df4818000cef7499a8b1c9c1ce1f4371
(cherry picked from commit bfed92dffecc3b574f24920733c74565fb1ae29c)
When building against core.git master:
kit/ChildSession.cpp:2668:13: error: enumeration value 'LOK_CALLBACK_SC_FOLLOW_JUMP' not handled in switch [-Werror,-Wswitch]
It's not clear how we want to handle this in Online, so have a default
label in debug builds as well.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia0b1cef33e8a5a7fbc1518586ea1e3bb13aa5f22
Normally (ideally), tiles (.bmp files) are removed as soon as the JS
has displayed them. But occasionally something goes wrong and they are
left behind. (For instance, it seems to happen if the user closes the
document immediately when it shows up.)
Do not leave them on disk until the app starts the next time.
Change-Id: I0c764280a69a16ad3b7b67c329832fd5331c2e1e
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Remove the app's copy of the document after core has saved it and we
have stored the edited version at its real location.
Remove possible leftover tile bitmaps when the app starts.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ibc41be38c2cfb689c532640d148116bc06a248ab
Add profile zone around kitPoll function and SocketPoll constructor to
improve trace event generation
Signed-off-by: Gopi Krishna Menon <krishnagopi487.github@outlook.com>
Change-Id: Ia46e9add59a57935997649fe39861a8d851e1ff0
issue wrt busypopup sending string id for dialogEvent
was already fixed on JS side.
remove unnecessary comment from commit 48f7449
Ignore conversion error from std::stoull for "busypopup"
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7640b4f693d9d018ae17acb3a9eb292a2423bb68
We cannot rely on wsd being slower than the kit. The rename
has to happen before wsd / DocumentBroker gets to trying to access
the filename. fixes#2874.
Change-Id: Ie1e67cd059fb6a663048967c47759238c067172d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Records the uno commands from different instances of ChildSession and
dumps the last 4 uno commands into the crashlog during a fatal crash
Signed-off-by: Gopi Krishna Menon <krishnagopi487.github@outlook.com>
Change-Id: I838f71769dc08df7076c040f3d72c15f7607e9d3
Makes unit-rendering-options fail reliably.
This reverts commit 175c9c5b2a.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Id05c911991baaae0dbc52678a192fc01639352e0
By passing a traceevent=yes query parameter in the URL. Note that if
Trace Event generation is not enabled in loolwsd.xml this will have no
effect.
It is a bit silly to notice this query parameter only in loleaflet and
then send the information back to the server. Would be better if the
server noticed it itself before sending the URL to loleaflet.
While at it, let's not bother ever enabling Trace Event generation in
the WSD process. That is not what we are interested in.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I985bfd1e2dbd14aa5a55b386b4762fb64bcb4008