Commit graph

3328 commits

Author SHA1 Message Date
Pranav Kant
a97b4f52b8 loolwsd: Make FileServer a singleton 2016-07-28 13:54:50 +05:30
Pranav Kant
fee967e510 loolwsd: Fix indentation 2016-07-28 13:54:50 +05:30
Miklos Vajna
84ef81b7b4 LOOLWSD, Util: follow coding style when prefixing data members
Change-Id: Iaf788cc8e5b7df473a52fbe8496d500f0f63c117
2016-07-28 08:39:27 +02:00
Artyom Sovetnikov
85d275ab1a loolwsd: Remove pong frame hack
https://github.com/LibreOffice/online/pull/1
2016-07-27 23:04:25 +05:30
Ashod Nakashian
93d38f6e78 loolwsd: document new per-view notifications
Change-Id: Idfafb981e6face61c65809b24c646ceac9507992
Reviewed-on: https://gerrit.libreoffice.org/27591
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 16:01:10 +00:00
Ashod Nakashian
1300b412fb loolwsd: comments
Change-Id: I57ba646df6ceb24d4f101a5539c979e77130cfc9
Reviewed-on: https://gerrit.libreoffice.org/27589
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 16:00:54 +00:00
Ashod Nakashian
ecd33e1b07 loolwsd: send json messages to the UI as text
Change-Id: Ie5712b4ebf4f01a6650f5f7c0df5197b5b9f9208
Reviewed-on: https://gerrit.libreoffice.org/27588
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 16:00:25 +00:00
Ashod Nakashian
219143ceda loolwsd: unittest fixes for multiview
Three tests still fail and seem to be regressions
due to multiview. When WSD is not running with
multiview support, these tests pass.

Change-Id: Ice3224d92d10f761cb8827d35c9c0c5dd82ae308
Reviewed-on: https://gerrit.libreoffice.org/27587
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:59:29 +00:00
Ashod Nakashian
7826d85832 loolwsd: forward new notifications
Change-Id: I434545a5edb48f957d0e03c02040cc25644f67c4
Reviewed-on: https://gerrit.libreoffice.org/27586
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:59:07 +00:00
Ashod Nakashian
d56f9a0386 loolwsd: status now includes the view-ID of the client
Change-Id: Iac1cd806ac24ff3956624513946921020d248664
Reviewed-on: https://gerrit.libreoffice.org/27585
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:55:09 +00:00
Ashod Nakashian
92d36a5791 loolwsd: loKitDocument might be invalid
Check for valid loKitDocument instance when
using it in ChildSession dtor.

Change-Id: I1e883d0f1bbe530bf3055a2d0833be2d38ef253c
Reviewed-on: https://gerrit.libreoffice.org/27584
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-27 15:54:40 +00:00
Miklos Vajna
c3e2a6cd40 AdminModel: use std::move()
Change-Id: Ib83b91bdbec2f71d96873a6146065707173349df
2016-07-27 09:22:12 +02:00
Miklos Vajna
e36ecbaf78 PrisonerSession: use std::move()
Change-Id: I934eb4fcc5ebac12e8a85bfe711afddf79b8194f
2016-07-26 09:29:39 +02:00
Miklos Vajna
aa9902970c LOOLWSD: avoid performing multiplication at int level
Change-Id: I5d293482860954144f7664638443d5c72ba9a8cc
2016-07-25 08:27:23 +02:00
Henry Castro
7f5eed80a0 loleaflet: remove styles toolbar from spreadsheets 2016-07-24 10:55:51 -04:00
Ashod Nakashian
9510c1aca7 loowsd: log file server requests
Change-Id: Ia3e9ebf2888a629b8e5fb0b83dd526fcaec03835
Reviewed-on: https://gerrit.libreoffice.org/27452
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-23 02:58:03 +00:00
Ashod Nakashian
e685f6a306 loleaflet: disable grey-out when debug-tools is open
Change-Id: Id3d2502fc7a38303395e70b710adaeaf7fae92a6
Reviewed-on: https://gerrit.libreoffice.org/27451
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-23 02:57:49 +00:00
Henry Castro
fa02df7ad3 loleaflet: avoid Uncaught TypeError: Cannot read property
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
2016-07-22 20:39:29 -04:00
Miklos Vajna
b9fbc6d369 Update bundled headers 2016-07-22 18:09:32 +02:00
Andras Timar
0bd3e3e109 fix loolwsd cache cleanu cron job on Debian 2016-07-22 14:09:53 +02:00
Miklos Vajna
f5bf034949 FileServer: clean up unused 'using' declarations
Change-Id: I0db8215f21dbdc6e90c2a3bbfe517d7a0f3c4a0f
2016-07-22 09:18:28 +02:00
Ashod Nakashian
24da5ce6e0 loolwsd: unittest fix
Change-Id: I371d7480e648cd2b28fb92b2d34db56614b4542f
Reviewed-on: https://gerrit.libreoffice.org/27422
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-22 04:31:40 +00:00
Pranav Kant
81b14c51f2 loolwsd: security: Sanitize user input in downloadAs requests 2016-07-21 16:01:35 +05:30
Pranav Kant
f8cc5d3877 loolwsd: security: Sanitize user input in convert-to API 2016-07-21 15:17:59 +05:30
Miklos Vajna
5179d41521 LOOLSession: use std::move() 2016-07-21 10:19:39 +02:00
Pranav Kant
3907a2f3cc protocol.txt: Update lokitversion info format
Change-Id: I1ea7d6d777d6b3b790ece6c268b9d15167f67a44
2016-07-21 13:18:00 +05:30
Pranav Kant
f684e505da loolwsd: Restore test for convert-to API
This got accidently removed in
8e266391f1

Change-Id: I3d03b1b75f05f5855397e46a7fccc30c794ca151
2016-07-21 12:54:59 +05:30
Pranav Kant
39645c974d loolwsd: Fix convert-to regression; fix incorrect filepath formed
Regressed with 886af28bc2

Poco::URI::encode appends to given string, and encodedTo already
had content leading to incorrect path. Use a new std::string variable.

Change-Id: Ia72ff60ed9cf7f14ff649416a2ceeeda13ff6197
2016-07-21 12:54:27 +05:30
Pranav Kant
9417ec839c loolwsd: Introduce headless peer;fix convert-to API partially
Convert-to API got broken in
80786cc79d

In case of convert-to API, there is no actual client facing
websocket connection (and we use an invalid websocket
connection). So, when prisoner session tries to forward messages to
client it would fail as we have now started to propagate errors
from forwardToPeer.

Introduce a headless (without an actual client) peer mode, and
fail silently when someone tries to forward messages to such a peer.

Change-Id: I8a9f93f798dca9fea45c41e99bf373cd23d32e2c
2016-07-21 12:37:44 +05:30
Pranav Kant
4ae0a4f048 Update convert-to api details in reference.txt
Change-Id: Ie9b8a4f65bba768c5cd384b6c76b95b60587a12e
2016-07-20 14:35:00 +05:30
Miklos Vajna
97207e21ca LOOLKit: avoid loss of precision
'4 * pixmapWidth * pixmapHeight' was calculated using int precision, and
then (implicitly) casted to long.
2016-07-20 09:54:05 +02:00
Pranav Kant
dff5118d3a loolwsd: Better handling of JWT cookies
Use Poco API instead of manually finding the cookie in request
headers.

Change-Id: I4fee64b0adfe8a3139ad4291512e94fd65f9aa9d
2016-07-19 23:28:36 +05:30
Pranav Kant
319dd56598 loolwsd: Don't send an empty result in frame
Change-Id: Ia4cf4c6d49be4b65d075c8380994dd7115ba2dc6
2016-07-19 23:28:36 +05:30
Pranav Kant
f9b86d749d loolwsd: Split FileServer into header/implementation
Change-Id: Idf0d2cb92028a79b8b32e0225ce5be1a1156542e
2016-07-19 22:53:48 +05:30
Pranav Kant
ff5704a3cf loolwsd: Drop forward decl. and add missing include
... instead of including Storage.hpp through some funny inclusion
of header files.

Change-Id: I7b6d63b687ef92c4523c01455172ad9fa08fe14a
2016-07-19 22:53:48 +05:30
Pranav Kant
478879f181 loolwsd: Reorder header files alphabetically
Change-Id: Ic83155ddf596c7d5168ef37721417d211b85313d
2016-07-19 22:53:48 +05:30
Pranav Kant
c94d2b79fb loolwsd: Missing include
Though it still works without it through some other indirect
include. Better explicitly include it.

Change-Id: Ia0783cd1b1116d5269248ff29f7e7239c3826644
2016-07-19 22:53:48 +05:30
Pranav Kant
9b29565448 loolwsd: security: Sanitize user input before generating HTML
Change-Id: I835bc84ba197a31745cd593c22571ae9f9ad7b1a
2016-07-19 20:54:07 +05:30
Pranav Kant
6457d779da loleaflet: admin console: Refactor and fix potential XSS
Use jquery instead of plain html methods.

Change-Id: I6f70ef81ca7f021f8b42a1e4faea055ef1f15e37
2016-07-19 15:54:42 +05:30
Miklos Vajna
78687a2b18 LOOLKit: be explicit when testing for non-equality
So that it's obvious that strcmp() is not just a mistyped !strcmp().
2016-07-19 11:19:20 +02:00
Jan Holesovsky
d21b1073e2 Some better defaults. 2016-07-19 11:17:41 +02:00
Jan Holesovsky
6aae20e217 Setting the RuntimeConstant in production should not throw.
It is very bad, but let's not get the production env. down by that.
2016-07-19 11:07:07 +02:00
Marco Cecchetti
6e616b745f loolwsd: SSL support can be enabled/disabled on server start
SSL support is enabled by default, it can be disabled by passing the
`--disable-ssl` switch on the command line or by setting `ssl.enable`
property in loolwsd.xml config file.

It is still possible to build loolwsd with no SSL support at all.

Change-Id: I00f952edc64f87f61505af44fdc2a715780dc44c
Reviewed-on: https://gerrit.libreoffice.org/27288
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-07-19 08:59:49 +00:00
Pranav Kant
483dbbc77e Revert "unit-admin: Enable a test"
This doesn't seem quite ready yet. Needs little bit more work
before we enable it again. From logs, it looks like 'rmdoc'
messgage is arriving really late.

This reverts commit e6e9236a6a.
2016-07-18 20:44:00 +05:30
Andras Timar
5f77a1f611 new default: Collabora Office 5.1 2016-07-18 17:04:25 +02:00
Andras Timar
35f0ba3c5b Pull translations from Pootle 2016-07-18 16:47:19 +02:00
Miklos Vajna
24624762df DocumentBroker: use std::move() instead of manual reset()/release() 2016-07-18 10:33:04 +02:00
Pranav Kant
da6af8b4ec loolwsd: Don't upload to storage if document is unmodified
If core says that document save operation failed because document
was in unmodified state, don't upload to storage (hence no
revision)

Change-Id: I47fbc8a7bc632bb7977d263d697d665161f3b076
2016-07-18 12:12:12 +05:30
Pranav Kant
c9f0f81a1a loleaflet: Convert Ctrl + s to .uno:Save
Saving this way, key sequences are forwarded to core directly, so
loolwsd is not aware if a save operation is going on or not. This
leads to problem as loolwsd might want to upload to storage.

Change-Id: I32d10012064a0dda7fff0c3ac4848f140b1b6fb8
2016-07-18 12:10:25 +05:30
Pranav Kant
e6e9236a6a unit-admin: Enable a test
testRmDocNotify was disabled earlier as it seemed to fail
intermittently. Hopefully, refactoring in
78876b011d2c3da972ef456a6da2cac08cb0d7d6 and
4360d31c9e8a3a099d869a9dfd0e2db8a0c03a52 should fix this one too.

Change-Id: I542ca27fab7eb4dfa8ed4a55a7f2eada63e7b96c
2016-07-18 12:03:27 +05:30