Commit graph

1318 commits

Author SHA1 Message Date
Ashod Nakashian
af58a9e761 wsd: whitespace
Change-Id: Id8185dab66f95676be2db8908d0f12c5284174fb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86321
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-07 11:47:04 +01:00
Michael Meeks
9cef0f385d watermarking: create SessionMap template to canonicalize views.
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>
2020-01-06 13:52:29 +01:00
Marco Cecchetti
35831935d8 wsd: disable unsupported code on mobile
Change-Id: I5d51a536e32bdf3262f3d39dda8ddb3152fa4460
Reviewed-on: https://gerrit.libreoffice.org/85633
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2019-12-20 20:32:42 +01:00
Henry Castro
9290981013 wsd: debug: add env variable "PAUSEFORDEBUGGER" to attach debugger
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>
2019-12-20 19:57:47 +01:00
Miklos Vajna
d0fee8c6ad These can be made const
Change-Id: I952a7566176bda727f8c2e9618d41bfb7bb1240f
Reviewed-on: https://gerrit.libreoffice.org/85197
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-16 09:24:08 +01:00
Michael Meeks
5d5fb42715 Typo fix.
Change-Id: I4698a00a8646366bcf30aabd997c31996a58d0e0
2019-12-14 16:19:48 +00:00
Andras Timar
97ee22a8ff fix error: declaration of ‘load’ shadows a member of 'this' [-Werror=shadow]
Change-Id: I4bd4fb3ae6f01c0d03d622f90e1dfb872c396494
2019-12-13 16:05:52 +01:00
Jan Holesovsky
863111c952 mobile: Fix build.
Change-Id: Ie0f08a984b9333ca65d0fd52c71e358b7fd5f771
Reviewed-on: https://gerrit.libreoffice.org/85018
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-12 09:57:44 +01:00
Michael Meeks
948b424abb convert-to: wait for load to complete before attempting the save.
Change-Id: Iee3a8a6720bbc29fc4e113bf705f405b840e1e45
Reviewed-on: https://gerrit.libreoffice.org/85009
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-12 07:42:42 +01:00
Michael Meeks
83e02ab38b Add a time limit for badly behaved / huge document conversions.
Handles problems with load, save, and lingering DocumentBrokers.

Change-Id: I6079cba3a4fa2a84c303b3a8669d94863a04f474
2019-12-12 03:38:50 +00:00
Jan Holesovsky
f71522e7ff TemplateSaveAs is broken by design, let's disable it.
Change-Id: I67a4c6aed1c66a8350f2b938fff7bcf1dfd84768
Reviewed-on: https://gerrit.libreoffice.org/84740
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-12-10 16:25:47 +01:00
Miklos Vajna
b580a1eaf2 wsd: fix a typo
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>
2019-12-06 12:12:43 +01:00
Ashod Nakashian
86a80a4cca wsd: handle http forbidden response from wopi put
Change-Id: I597e949cd1bea612400d623f30ea260036253e89
Reviewed-on: https://gerrit.libreoffice.org/84360
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-03 16:02:16 +01:00
Marco Cecchetti
836ce7d636 formula bar: function complete
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>
2019-12-02 17:34:13 +01:00
Tor Lillqvist
29b603a34f Fix build for MOBILEAPP
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>
2019-11-29 12:12:30 +01:00
Michael Meeks
039ca3540e tdf#125755: specialize reduced decoding for mobile apps.
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
2019-11-28 18:05:04 +00:00
Michael Meeks
84c218786b fix calc simple, single cell content copy; add origin to plain text.
Change-Id: I7a6b0c90a74f6e3a91a840bf77c0935a300321f2
2019-11-27 19:17:27 +00:00
Michael Meeks
0d97efbfcc locking: renew lock after timeout.
Change-Id: I6191ee34239b978292aeb6795be74312a954e240
2019-11-27 19:17:27 +00:00
Michael Meeks
e3864a060e Dump DocumentBroker state more completely.
Change-Id: I3477fe70ba25d6e9a95c12f30138c3353994e384
2019-11-27 19:17:27 +00:00
Tor Lillqvist
c806acb157 tdf#125755: Fix some URI encoding issues
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>
2019-11-25 18:10:42 +01:00
Miklos Vajna
5d3a2b3f56 wsd: fix -Werror,-Wmismatched-tags
Change-Id: I863c75c5af9a19dda306f574b4e90c5da3399d1d
2019-11-25 15:02:02 +01:00
Michael Meeks
918d4ae150 Add quick link to check monitoring.
Change-Id: I069eeaf8464661aaff52f11523d70c40cc81cc46
2019-11-25 12:47:17 +00:00
mert
8ca7391f05 Added an option to override watermark texts
in loolwsd.xml. If set, watermarks will be the same
as entered for all the views instead of per view
watermarks sent in CheckFileInfo

Change-Id: I0943520423abc2567f44920f8679057b3cfbf01f
Reviewed-on: https://gerrit.libreoffice.org/83666
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-25 13:10:05 +01:00
Gabriel Masei
2164f5207c Add REST endpoint for admin metrics.
Change-Id: I701485631931334d27594c4907cb770f9888e5bf
Reviewed-on: https://gerrit.libreoffice.org/82492
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-25 13:06:01 +01:00
Corentin Noël
b2f893ae0e Allow ConfigValueGetter to be used with uint64 on 32 bits systems
Change-Id: I5d19c97c6900cea6476e85afd4cfe9885f6c8fa0
Reviewed-on: https://gerrit.libreoffice.org/83513
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-22 18:48:05 +01:00
Mike Kaganski
c39645bed5 Fix comparison of integer expressions of different signedness
Change-Id: Idcbaf83cb5f953cb725e5b84c27bc00b2fc267d6
Reviewed-on: https://gerrit.libreoffice.org/83475
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-22 13:03:38 +01:00
Corentin Noël
62ed202e2d Fix issues with size_t and ssize_t on 32bits machines
Change-Id: I3859e12e234b0fec6b94736cacc7874cd8809476
Reviewed-on: https://gerrit.libreoffice.org/83449
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-22 11:20:57 +01:00
Ashod Nakashian
7c4ba459ff Encode the ExtendedData to make it safer while embedding in messages
Change-Id: I1d4bdb2775d89e9a52a96d833228ca8577ee3561
Reviewed-on: https://gerrit.libreoffice.org/83044
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-22 01:51:11 +01:00
Michael Meeks
3dbee6745b Log an error, and return failure on unhandled responses to save.
Change-Id: Ib241a88e53a11276b3837f49ea6d964d706919a4
2019-11-21 18:44:38 +00:00
Miklos Vajna
0077b4ae6a wsd: fix -Werror,-Wmismatched-tags
If it's a struct, then forward-declare as struct, not as class.

Change-Id: Ia78d7c1bee222bd1f499fe93aaf2dda9b81f423a
2019-11-21 17:42:08 +01:00
Michael Meeks
994f8993d9 Add proof for locking calls (and mend the build).
Change-Id: I4cbaf682a14316750a676a14d986ecf59045581d
2019-11-21 14:34:36 +00:00
Michael Meeks
cabd30a1b8 Initial wopi-like locking implementation.
Change-Id: I3e16cfc40dbd29a24016b09e62afc9ec488300c7
2019-11-21 14:24:58 +00:00
Mike Kaganski
a986aabeb1 Initial implementation of proof-key
Change-Id: I7ab79218ca2af268dd4573cb64c6353dc71b5f03
Reviewed-on: https://gerrit.libreoffice.org/82232
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-21 12:56:53 +01:00
Jan Holesovsky
78e3dd0ae6 Revert "killpoco: Remove StringTokenizer from LOOLWSD.cpp."
Blind fix - I've seen a report of a problem with a 'Syntax error' caught
around this code.  Unfortunately cannot reproduce this myself, but
better to revert for now.

This reverts commit f637f4a75a.

Change-Id: I41cfa2a97127c430b2dd8140ad3f20b7f0eb221a
Reviewed-on: https://gerrit.libreoffice.org/83349
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-20 19:41:03 +01:00
Tor Lillqvist
c6497bda19 No need to "rescue" the clipboard in the iOS app
Change-Id: I805c14f2405eeed39127bdac29d7c93374ddc942
Reviewed-on: https://gerrit.libreoffice.org/83340
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-11-20 17:26:09 +01:00
Michael Meeks
d4b71cb73d Share code for reuse_cookies handling.
Change-Id: I9e4d66f14b46284c8d4f33173f028f0bcea34be2
2019-11-20 15:41:06 +00:00
Michael Meeks
68d81dae49 Read and store SupportsLocks property.
Change-Id: Ic405dfa5f6e759937094835f41787fa2cbe29f49
2019-11-20 15:41:06 +00:00
Lionel Elie Mamane
1fbf148f09 modernise TLS setup
Some machines (e.g. Debian 10) by default will refuse DH groups
shorter than 2048 bits.

Change-Id: I3505bc392775d7c92069a8f705f574338666a8e7
Reviewed-on: https://gerrit.libreoffice.org/83300
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-11-20 13:48:07 +01:00
Ashod Nakashian
eb6508061d wsd: notify clients of WOPI CONFLICT response
Change-Id: I7ad7d88066af7f2bba7fd3307c688ab85ba561eb
Reviewed-on: https://gerrit.libreoffice.org/83216
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-19 16:07:18 +01:00
Pranam Lashkari
7349cc1f32 additional URI support added for some broken Implementation
"/hosting/discovery/"  added in addition to "/hosting/discovery"

Change-Id: I33f7fda9981d8d4e95ca5d69d3d6b3da1e4b0eeb
Reviewed-on: https://gerrit.libreoffice.org/83169
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-19 14:51:17 +01:00
Michael Meeks
98617e40e2 Enable protocol debugging by default in debug mode.
Also add a config option for logging.protocol - to help catch early
protocol issues during startup.

Change-Id: I6f0cc6dcf14b2797bc6b2bd36c44750d74eb0608
2019-11-15 18:01:02 +00:00
Pranam Lashkari
a6b0e5b827 killpoco: removed StringTokenizer from wsd directory
removed use of Poco::StringTokenizer from the wsd directory using LOOLProtocol::tokenize and std::vecor<std::string>

Change-Id: Ic50b4d4d71d4ffd005aacf6aef0ed2bfde66d40d
Reviewed-on: https://gerrit.libreoffice.org/82569
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-13 09:51:04 +01:00
Ashod Nakashian
4cb038c60a wsd: Destroy ChildProcess instances before exit
ChildProcess instances log in the dtor, and this can
happen after the log subsystem has been destroyed,
because the order of destruction is undefined.
NewChildren is destroyed in exit, at which point
we have no control over the log subsystem.

To avoid this inversion of order, we clear
the NewChildren container before exiting.

Change-Id: I7b1bac3123fd7917616c11ab9674534c9222fff1
Reviewed-on: https://gerrit.libreoffice.org/82533
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-12 16:45:19 +01:00
mert
a8a11ef8f9 Fix mixed watermark texts
Change-Id: Id350d9dffc479350f240e82a4cc62ec97e5d68e1
Reviewed-on: https://gerrit.libreoffice.org/82372
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-10 23:46:09 +01:00
Jan Holesovsky
f637f4a75a killpoco: Remove StringTokenizer from LOOLWSD.cpp.
Adds possibility to tokenize using a regex easily.

Change-Id: Ie327d4faabec330c76d4cadb1d14bbe1527d332f
Reviewed-on: https://gerrit.libreoffice.org/82333
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-08 22:24:08 +01:00
Jan Holesovsky
15dcf613d8 killpoco: More complicated StringTokenizer removal in DocumentBroker.
Change-Id: I55688bfdd5aef49e27dddf56cc47c2ec5834768c
Reviewed-on: https://gerrit.libreoffice.org/82324
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-08 22:23:25 +01:00
Jan Holesovsky
efa293290c killpoco: Remove trivial StringTokenizer uses from some files.
Particularly those used on Android...

Change-Id: I47bf9692f5e99ba30140d698558472201168a198
Reviewed-on: https://gerrit.libreoffice.org/82302
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-08 22:21:31 +01:00
Aron Budea
8df2610dc9 Update reference to TemplateSource in capabilities
Change-Id: I1a0c08752bf81ae6675ea7430ca3024c35bd8c89
Reviewed-on: https://gerrit.libreoffice.org/82316
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2019-11-08 17:57:33 +01:00
Jan Holesovsky
9d535ca76d Deprecate TemplateSaveAs and document TemplateSource.
Change-Id: Ic9c7bed3ebcf2356470323804bca957acafcbf23
Reviewed-on: https://gerrit.libreoffice.org/82284
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-08 13:53:44 +01:00
Jan Holesovsky
5d0d3a4869 killpoco: Get rid of Poco/Thread.h from the rest of the Android-related files.
Change-Id: I724230a4428cab3cc26245ac4aa43a91af2e09ce
Reviewed-on: https://gerrit.libreoffice.org/82204
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-07 12:24:26 +01:00