Commit graph

1885 commits

Author SHA1 Message Date
Tor Lillqvist
e41be7c0f4 Revert "loleaflet: Move admin console related files to dist/admin"
This reverts commit 3a09c992f7.
2016-03-21 16:52:52 +02:00
Tor Lillqvist
09d3c5f230 Revert "loolwsd: Allow specifying custom file server root"
This reverts commit a5f8ba44a2.
2016-03-21 16:52:46 +02:00
Pranav Kant
a5f8ba44a2 loolwsd: Allow specifying custom file server root
By default, use git directory root.

Change-Id: I4ee1173c43f313de3abb1732e6a7401169896189
2016-03-21 16:33:47 +02:00
Pranav Kant
3a09c992f7 loleaflet: Move admin console related files to dist/admin
Better to put all admin related content in a separate directory
rather than mixing it with other files in dist/

Change-Id: I328ff95cf23251ff91bb438c3b9be923ccc2017f
2016-03-21 16:33:17 +02:00
Pranav Kant
a0d3c5f3e4 loolwsd: Use JWT authentication to access admin console
File server serves the admin html file after successfull
authentication, and sets the cookie in client which would be sent
for all subsequent connections by client to connect to admin websocket.

Change-Id: I0ee3bbfca7eefc428020d29612374410556b1e27
2016-03-21 16:32:41 +02:00
Pranav Kant
8f435d6e7e loolwsd: FileServer class to serve static contents
Only purpose, at the moment, is to create
Poco::HTTPRequestHandler which would be passed on the serving
handling the static file requests.

Change-Id: I97c3fc0c73da077d3efee919416098b880c9c2ad
2016-03-21 16:31:41 +02:00
Tor Lillqvist
9d85937a55 We need Poco 1.7.1 now after fb9c9a9ec7
At least Poco::Net::Context::Params is new in Poco 1.7.
2016-03-21 16:28:33 +02:00
Pranav Kant
fb9c9a9ec7 loolwsd: SSL infrastructure
... and use SSL for client connections.

Change-Id: Id396a7c2d1830da8d3b0ce446522403363ac17c1
Reviewed-on: https://gerrit.libreoffice.org/23395
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-03-21 14:05:10 +00:00
Pranav Kant
14823f29b4 loolwsd: JWT Auth - Generation and verification of JWT tokens
Change-Id: If97fa52866f8d1d8976bd1a7340e2dac07e56c03
2016-03-21 15:56:00 +02:00
Pranav Kant
eeb22ce59d loolwsd: Move the authorizationCode to specialized OAuth class
To make room for other classes deriving from AuthBase that do not
require any authorization code, such as JWT authentication.

Change-Id: I69a35dd6f775badd7377949df2ca326c910d4021
2016-03-21 15:54:53 +02:00
Jan Holesovsky
5d6ab6e8dc loleaflet bccu#1579: Do not attempt pre-fetching non-active parts. 2016-03-21 13:36:03 +01:00
Miklos Vajna
2563b3c848 loolwsd: add missing prefix in Admin 2016-03-21 08:59:15 +01:00
Tor Lillqvist
7bc2690497 More members can be private 2016-03-20 21:52:27 +02:00
Tor Lillqvist
26ccae2ac6 Add vim mode line 2016-03-20 21:52:27 +02:00
Tor Lillqvist
e55df2d021 The jailed processes are not "loolwsd" in any sense any more 2016-03-20 21:52:27 +02:00
Miklos Vajna
7a19ff3190 loolwsd: add Log::info() calls for paste 2016-03-18 18:08:41 +01:00
Michael Meeks
2931f45219 Parse and track starting and running lok instances. 2016-03-18 16:59:04 +00:00
Pranav Kant
b881e986d8 loleaflet: Column and row headers are selectable now
... with multi-select shift and ctrl key behavior like desktop
calc version.

Change-Id: I574037f984ee1844773b0fb8c90c5bb1c079188b
2016-03-18 12:09:15 +01:00
Henry Castro
979b4298b4 loolwsd: update discovery.xml 2016-03-17 19:48:34 -04:00
Andras Timar
638460381e package and deploy discovery.xml 2016-03-17 15:24:09 +01:00
Andras Timar
2b31359346 chmod -x 2016-03-17 15:22:35 +01:00
Pranav Kant
33134022be loleaflet: Fix command values and styles coming from server
Change-Id: I34c30c0c0d519a96192e67a977fccdd6e5840b13
2016-03-17 19:10:02 +05:30
Pranav Kant
d9085eb0d0 loleaflet: Don't use l10n framework for style mappings
Change-Id: I25c738b885f145e69a3516530c77d92a614f7053
2016-03-17 12:34:26 +05:30
Henry Castro
3f93cdc1d1 Revert "loolwsd: read WOPI scheme, hostname from config values"
This reverts commit ad980bee02.
2016-03-16 19:58:44 -04:00
Michael Meeks
fb3e19896e Simple log cruncher to CSV. 2016-03-16 20:48:10 +00:00
Henry Castro
ad980bee02 loolwsd: read WOPI scheme, hostname from config values 2016-03-16 16:45:20 -04:00
Henry Castro
8a6cfdf961 loolwsd: load default configuration files 2016-03-16 15:52:01 -04:00
Henry Castro
dc129d00cc loleaflet: add WOPISrc parameter 2016-03-16 08:58:07 -04:00
Miklos Vajna
05f19cd7de loolwsd: fix -Werror,-Wunused-private-field 2016-03-16 09:11:56 +01:00
Henry Castro
bda64dbf2b loolwsd: fix get host from request 2016-03-15 19:16:58 -04:00
Tor Lillqvist
8fda553844 The /dev/random and urandom problem was a red herring
I had been using a file system mounted with nodev to test loolwsd.
2016-03-15 22:24:58 +02:00
Henry Castro
8a2bd1127b loolwsd: WOPI, handle request discovery 2016-03-15 11:35:59 -04:00
Henry Castro
ac09d89505 loolwsd: add libPocoXML 2016-03-15 11:22:45 -04:00
Jan Holesovsky
0e33e3cf5c loleaflet bccu#1524: Ignore fit-width-zoom in spereadsheet.
It has no use there, nobody wants to see a huge spreadsheet zoomed out to fit
the screen.
2016-03-15 14:02:59 +01:00
Andras Timar
213e678193 loolwsd: add DocumentBroker.hpp to dist 2016-03-15 13:25:00 +01:00
Jan Holesovsky
6b15dfd552 loolwsd, loleaflet: Rename 'connectionclose' to 'disconnect'. 2016-03-15 10:32:28 +01:00
Jan Holesovsky
2c1664b9d5 loolwsd, loleaflet: Let the server know when we are closing the session.
This is to distinguish the deliberate close of connection, and timeout,
connection drop, or forced close.

When the last session is closed non-deliberately, force a save so that the
edits are not lost.
2016-03-15 09:46:37 +01:00
Andras Timar
345f136145 loolwsd: fix -Werror,-Wshadow 2016-03-14 10:33:11 +01:00
Ashod Nakashian
981e83ece6 loolwsd: fixed convert-to (POST) tests
Change-Id: I6d48971b9daf0beaa16defa0b5f4dfb94575713c
Reviewed-on: https://gerrit.libreoffice.org/23228
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:18:03 +00:00
Ashod Nakashian
cc0a607185 loolwsd: fix tests to pass URL in GET request
Change-Id: Ia4027bfccca49f48feee52c9e4d86505cae02aa1
Reviewed-on: https://gerrit.libreoffice.org/23227
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:17:46 +00:00
Ashod Nakashian
66cd6cd5c3 loolwsd: improved DocumentBroker lifetime and thread handling
Change-Id: Ic8e16f0ec6b273165f7ba4e9b8d95003503530a6
Reviewed-on: https://gerrit.libreoffice.org/23226
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:17:24 +00:00
Ashod Nakashian
e0b14c0e22 loolwsd: give Broker the docKey, not URL
And reject connections with no doc URL.

Change-Id: I11490be6aaea6a4ca2d66d8d2c8d6b52e1e48a04
Reviewed-on: https://gerrit.libreoffice.org/23225
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:17:04 +00:00
Ashod Nakashian
c42ea2ea13 loolwsd: avoid complaining when killing exited child
Change-Id: If819cc2171d241d9e059f2b563cc8f6b8161d304
Reviewed-on: https://gerrit.libreoffice.org/23224
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:16:07 +00:00
Ashod Nakashian
f2eec85b2a loolwsd: jailId ought be random, but must be PID
Ideally, we will have a randomized path for the jails.

Unfortunately, this will make it harder to cleanup
after an ungraceful exit of a child, including recovery
of docs etc.

Having a PID for the jailId makes this issue easier by
implicitly implying the jail path for a given child.

To prevent security leaks, we should at least randomize
the doc directory within the jail, as such:

/chroot/<pid>/user/docs/<rand>/

For now we use jailId=pid=rand.

Change-Id: I948fba0aaef725c9c059780df0a184a86569d898
Reviewed-on: https://gerrit.libreoffice.org/23223
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:15:04 +00:00
Ashod Nakashian
29e9ba68c3 loolwsd: removed unnecessary childId, which is in the child URL
Change-Id: Ibea2cd73657446ad4660400a0a9a38b376499df5
Reviewed-on: https://gerrit.libreoffice.org/23222
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:14:43 +00:00
Ashod Nakashian
1aa7a6cf05 loolwsd: simplified DocumentBroker::create
Change-Id: Ia97be0861c7c178859d695ae5e2862e88cb3ca77
Reviewed-on: https://gerrit.libreoffice.org/23221
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:14:11 +00:00
Ashod Nakashian
0b18a67da2 loolwsd: DocumentBroker cleanup
Change-Id: Iedf2e0afd3c63d24b96ce1c7923c90d86d82bc13
Reviewed-on: https://gerrit.libreoffice.org/23220
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:13:53 +00:00
Ashod Nakashian
38c4acd5f0 loolwsd: moved document loading outside of MasterProcessSession
Change-Id: I8ecce82abcae6d0f07b86c188c91913ff9ca115a
Reviewed-on: https://gerrit.libreoffice.org/23219
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:13:37 +00:00
Ashod Nakashian
c6b47cc437 loolwsd: removed superfluous getJailPath
Change-Id: Iff11ea791866f31a47cf0d0b1d1fb06d18f5be40
Reviewed-on: https://gerrit.libreoffice.org/23218
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:13:02 +00:00
Ashod Nakashian
c0cf48f5ac loolwsd: jailRoot moved in DocumentBroker
Change-Id: Ic9dfce0cb0f2f87fae9a918df500c89673f15716
Reviewed-on: https://gerrit.libreoffice.org/23217
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-14 03:11:47 +00:00