I need this to better control the byte order of values in the proof
Change-Id: I8a21c20af4cc3157c893d870f73cc2afa7910ff4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88076
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Effectively both approaches were doing the same thing, let's unify to
the iOS way to minimize the platform-specific code.
Change-Id: I11290410a536c26db054ffcb87e3b64cc2a11c07
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/84589
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Cookies may be passed from the client to the storage,
in which case each user may have its own unique set
of cookies. These cookies are now preserved in the
ClientSession, which is per connection, and are then
passed to the storage to use when communicating with
the WOPI-like backend.
(cherry picked from commit 6022faf3cc9b622b490c3f8ca91efbff8e542414)
Change-Id: Ic2e13fa541a5ee01b7383939bbbf7d46ea75684b
This is not needed, the commandline to run the test is printed on
failure.
Change-Id: Ia4da4344ede4ad8c1627a5560f1bc1264f4203c7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87288
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Don't just rename the variable, also make sure we get the FD before we
reset our local reference to it.
Change-Id: I676f148874831eaf9f37bdcde1216c58f89229e5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87244
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
Particularly printing it on the console, and passing it to the kit.
Change-Id: I158f97b7b219c44c885939d71af2e5e8283be4c2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87227
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
When trying to open a link normally from help->Online help
nothing happens but the popup is closed.
When trying to open a like forcefully in new tab
from help->online help it crashes the server.
Change-Id: I7e0944ebe521002625a84e155e379ed7e25d2309
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85466
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
The problem is that both the DocBrokers map and the instance returned by
Admin::instance() are static, so there it's not safe to assume that by
the time the DocumentBroker dtor runs, the static Admin instance is
still alive. Still, the DocumentBroker dtor calls Admin::instance().
Fix this by clearing the DocBrokers map in LOOLWSD::cleanup(), which is
used exactly to destroy statics in a controlled order.
Sanitizers output was:
wsd/DocumentBroker.cpp:497:23: runtime error: member call on address 0x0000024a5ba0 which does not point to an object of type 'Admin'
0x0000024a5ba0: note: object is of type 'SocketPoll'
00 00 00 00 50 21 45 01 00 00 00 00 b8 5b 4a 02 00 00 00 00 05 00 00 00 00 00 00 00 61 64 6d 69
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'SocketPoll'
#0 0xa10af3 in DocumentBroker::~DocumentBroker() wsd/DocumentBroker.cpp:497:23
...
#17 0x7fa27622ddc9 in exit (/lib64/libc.so.6+0x38dc9)
#18 0x7fa276215f90 in __libc_start_main (/lib64/libc.so.6+0x20f90)
#19 0x670189 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wsd/DocumentBroker.cpp:497:23 in
(Seen during make check CPPUNIT_TEST_NAME="unit-each-view".)
Change-Id: I02ad44deb9de06d9973216428c640248ea2512ce
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87174
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This reverts parts of commit da455c486a.
Unfinished; also stream size calculation cannot have worked.
Change-Id: I39635fe5165b82dd36095d58cfefff4920ce3a35
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86845
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Set the iframe's src in a script so we can pass on a filename cleanly.
add a postMessage: sample URI at the end of 'make run'
Move some of the more obvious pieces into framed.doc.html.
Change-Id: I2bd8215f083bcb16369421ed88acb198808c1fdb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86787
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Ironically our attempts to double-check message origin against our
parent was blowing a security exception.
Instead send the list of origins we will accept from WSD, and
check them ourselves (as well as the browser check).
Why make it so hard to check that a postMessage comes from an
ancestor frame ?
Change-Id: I1311be3e1d68a31cfdc96b45a5eb5dd7f26e7ea9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86788
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Without this, we were closing the document, which was very annoying.
Change-Id: I1e841da28c92c0e01284c2d7e2d4dbc6762bfffd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86779
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Use a fully reliable uniqueness check, rather than a hash, and get
simpler ids as a bonus. Fetch view data from the session itself
rather than passing it in too.
Change-Id: Ibcd625156b5a98eb280e35d6537b5c8c026d0197
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86150
Reviewed-by: Mert Tümer <mert.tumer@collabora.com>
Tested-by: Mert Tümer <mert.tumer@collabora.com>
It is painful to check and search manually the PID to attach the LOKit
process when exists several pre-spawned waiting to load a document.
This patch helps to attach the debugger when the LOKit process is about
to load a document then send the "signal SIGUSR1" to resume it.
Change-Id: I3b15bd522c6ef3ef57dc3453b457dcf91f2661b9
Reviewed-on: https://gerrit.libreoffice.org/85430
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
And disable a test that passes for me locally but fails on Jenkins.
Change-Id: Ifcdcedbac259247d784ce66185f95bfbe634381f
Reviewed-on: https://gerrit.libreoffice.org/84603
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
lok clients can request to complete a function name partially typed in
the formula input box.
Change-Id: If8e4485c5ed9f91a594dfcec04e0c0b10becdcd0
Reviewed-on: https://gerrit.libreoffice.org/83985
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
No Admin.hpp needed (which would cause a conflicting definitions of a
class called Document when compiling Kit.cpp).
No locks "supported" in the way the code expects for WOPI-like things.
Change-Id: Ie43311af054f2940576ce9b2b13520f24887628e
Reviewed-on: https://gerrit.libreoffice.org/84018
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
The WOPI multiple encoding magic is unpleasant; best not to try to
unwind it all now.
This fixes Download-As and SllideShow pieces.
cf. c806acb157
Change-Id: Ie06ad386c7a30e0f572e299e50fc949ce41b09f5
Now the iOS app is able to open a document called A#B?C\D&E❤️F🇨🇭G%AAHÖ.doc.
That is, with ‘#’, ‘?’, and ‘&’ that can mess things up when parsing URIs,
non-ASCII and even non-BMP characters, and an actual percent
character in the file name. Is that a complete enough test case? Will see.
Change-Id: I7fc53eaf8188f633d442d14a7f42814553169c71
Reviewed-on: https://gerrit.libreoffice.org/83395
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit b60ccd60c59efb5a03ea698c0205a8543846d9e2)
Reviewed-on: https://gerrit.libreoffice.org/83664
Tested-by: Aron Budea <aron.budea@collabora.com>