Commit graph

3157 commits

Author SHA1 Message Date
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
Ashod Nakashian
6536ba2fe2 loolwsd: correct multiview creation
Change-Id: Id6675f6410793b743aec53182a4b5756b7cffa23
Reviewed-on: https://gerrit.libreoffice.org/27272
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-18 02:49:45 +00:00
Miklos Vajna
8054df543a ClientSession: use std::move() where it avoids copying 2016-07-15 14:47:08 +02:00
Henry Castro
d57c5758fd loleaflet: add a menu drop down toolbar item 2016-07-14 22:24:50 -04:00
Henry Castro
ddfd0a3341 loleaflet: add more toolbar items
.uno:SortAscending
.uno:SortDescending
2016-07-14 13:49:35 -04:00
Pranav Kant
732c54313d loolwsd: Get rid of superfluous long list of fonts in test output
They make it difficult and annoying to analyze the test logs.

Change-Id: If970ab8296206e7462fe205a9b40cdf26a1eb37f
2016-07-14 10:59:36 +05:30
Ashod Nakashian
f52fa89036 Build-time configurable WSD limits
The server can now be configured at build time
to limit the total number of connections and/or
the number of open documents, at a given time.

./configure --with-max-documents=10 --with-max-connections=20
will limit the number of documents to 10 and total
number of connections (on one or all documents) to 20.

Change-Id: I0c73a7e906c4f567cb3da480e885524815c9cc89
Reviewed-on: https://gerrit.libreoffice.org/27203
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-14 02:18:58 +00:00
Pranav Kant
0f506fcbb0 Some more admin test cleaning
Change-Id: I3cea5b6fefcb7b4e6209c63e6b3e232b9db50a7b
2016-07-14 01:08:46 +05:30
Pranav Kant
4530bfdb0a loolwsd: Fix Admin unit test
Admin notify messages are emitted when websocket connection is
established, not when 'load' message is sent.

And, some minor cleaning.

Change-Id: If52a77c10c3af64dcca8d6c10868b3d46f48c774
2016-07-14 01:08:39 +05:30
Henry Castro
7fd9d334af loleaflet: cleanup unused statusbar items 2016-07-13 14:26:54 -04:00
Henry Castro
0202479687 loleaflet: l10n of 'Slide %1 of %2' 2016-07-13 10:45:23 -04:00
Henry Castro
3e2d81f37b loleaflet: l10n of '%1 words, %2 characters' 2016-07-13 10:02:59 -04:00
Henry Castro
374c288800 loleaflet: l10n of 'Page %1 of %2' 2016-07-13 09:18:00 -04:00
Miklos Vajna
9d337fa1e0 ChildSession: no need to copy these function objects 2016-07-13 09:23:22 +02:00
Henry Castro
e5a6ea3421 loleaflet: l10n of '$1 rows, $2 columns selected' 2016-07-12 18:04:37 -04:00
Henry Castro
111c660d46 loleaflet: l10n of 'Sheet 1% of %2' 2016-07-12 16:54:49 -04:00
Miklos Vajna
ec0c49447f Admin: avoid unsigned long -> unsigned int coversion 2016-07-12 15:56:19 +02:00
Pranav Kant
fc5047e827 Use -isystem and remove conditional -Wshadow
Change-Id: Icee68e557a3a0634c2da7385e29d658ec4f6e905
2016-07-11 13:29:24 +05:30
Miklos Vajna
5523c48f3f ClientSession: fix -Werror=shadow 2016-07-11 09:45:10 +02:00
Miklos Vajna
07b6f0ce64 Update bundled headers 2016-07-11 09:22:47 +02:00
Miklos Vajna
990108d243 test: make check insist on a log file for skipped tests 2016-07-11 09:22:47 +02:00
Miklos Vajna
9304c4152d HTTPWSTest: disable failing test on LO >= 5.2 for now 2016-07-11 09:22:47 +02:00