Commit graph

2029 commits

Author SHA1 Message Date
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
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
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
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
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
Miklos Vajna
9d337fa1e0 ChildSession: no need to copy these function objects 2016-07-13 09:23:22 +02: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
Pranav Kant
4ecfb0da21 loolwsd: -Werror=shadow
Change-Id: Ic0bfead873ab7f0b9c177183c0f6d3179d097d96
2016-07-11 11:57:58 +05:30
Pranav Kant
a6187e6172 loolwsd: Reset document destroying states
These values are recalculated anyways now, when destroying the
document (See startDestroy())

Change-Id: Idfe4c48983556bb2b31ca0d6bf2ffcde84281a2d
2016-07-11 11:25:25 +05:30
Pranav Kant
06dc3fd1bc loolwsd: Give editlock correctly when adding a new session
This should be given to first editable(non-readonly) session.

Change-Id: I3b6e53df4b2450cc799c4b4e6a800f662d90a2c1
2016-07-11 11:25:20 +05:30
Pranav Kant
d18379adce loolwsd: Show only abbreviated message when reading from cache
Change-Id: I6d5c8984010e2917b9069df6ee3b0a28c678b297
2016-07-11 11:24:19 +05:30
Pranav Kant
62814d29cf loolwsd: Introduce a readonly mode
Specified when websocket is initialized. Documents once
opened in readonly mode cannot edit throughout the life of the session.
This is very much like present view mode except the ability to
change to edit mode.

Change-Id: I176e3bbf210c3383268d1a5b50dc17f0cbfb26b8
2016-07-11 11:24:16 +05:30
Pranav Kant
162619be72 loolwsd: Avoid such abbreviations
Change-Id: Id63c960e198b9c5d45026833a24d6330ca137d35
2016-07-11 10:23:29 +05:30
Pranav Kant
37b9226030 loolwsd: unused variable
Change-Id: I60d10e4390b7c114273f517fb66786861f37db60
2016-07-11 10:23:29 +05:30
Pranav Kant
3d306a0d7b loolwsd: Don't check canDestroy again
We do not need to check canDestroy again after removing the
session if sessionCount > 1, otherwise we end up with
force-saving also for the second last session.

Change-Id: Iea4736569d07d9b23f78b0f6407f78eca6090d67
2016-07-11 10:23:08 +05:30
Henry Castro
adf4369237 loolwsd: test: state changed UNO commands 2016-07-10 14:28:28 -04:00
Miklos Vajna
3df68f3869 loolwsd: support CPPUNIT_TEST_NAME, similarly to core.git 2016-07-08 09:04:28 +02:00
Ashod Nakashian
64741ebb87 loolwsd: dump calc tile for debugging purposes
Change-Id: Ie2d92026fb77a4f94d6434ec25fc10695118971e
Reviewed-on: https://gerrit.libreoffice.org/27022
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 20:27:34 +00:00
Ashod Nakashian
2c4efeb5f3 loolwsd: fix PreFork test
We could have up to 3 pipes and we should tollerate them
when testing for leaking FDs and pipes.

The 3rd is probably a file redirection.

Change-Id: I913072307646e62e1802587c9142b2eb8c9dd7bb
Reviewed-on: https://gerrit.libreoffice.org/27021
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 20:27:18 +00:00
Miklos Vajna
2419df6e60 Update bundled headers 2016-07-07 19:21:57 +02:00
Ashod Nakashian
0d6cb541a3 loolwsd: better handling of bad requests
Change-Id: Ib1c4dee227275efc9b481f76b9d9892f98be61e7
Reviewed-on: https://gerrit.libreoffice.org/27017
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 16:50:51 +00:00
Ashod Nakashian
ac9c109581 loolwsd: logging
Change-Id: I458743348e2e163f917f0fe43cc340d72556021c
Reviewed-on: https://gerrit.libreoffice.org/26994
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:51:12 +00:00
Ashod Nakashian
bb9168096d loolwsd: test fixes
Change-Id: I927bab6c88c72247a7bf6fb73ae56e1ebc51cdbd
Reviewed-on: https://gerrit.libreoffice.org/26993
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:50:16 +00:00
Ashod Nakashian
42f857efe0 loolwsd: cleanup of testTileInvalidateCalc
Change-Id: Ic15d12f0b203244b3de1b80e97866f134efd82f7
Reviewed-on: https://gerrit.libreoffice.org/26992
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:49:31 +00:00
Ashod Nakashian
0eba4a17f8 loolwsd: remove unnecessary wait for invalidatetiles in tests
Change-Id: Ica79b995ef14fbf7d57e9ef435c87a84d854d5b8
Reviewed-on: https://gerrit.libreoffice.org/26991
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:49:07 +00:00
Ashod Nakashian
370c21f4b5 loolwsd: fix testTileInvalidateWriter
Change-Id: I701c348cbfe55f850bb2180b400020d1b1b01f31
Reviewed-on: https://gerrit.libreoffice.org/26989
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-07-07 03:35:43 +00:00
Henry Castro
c7a655b54d loolwsd: doc: running unit tests 2016-07-04 15:38:21 -04:00
Andras Timar
801c8f4676 loolwsd: command line config override should work in non-debug builds as well ;) 2016-07-03 16:43:47 +02:00
Pranav Kant
0b8e9dedaf loolwsd: Print abbreviated message while saving to TileCache
Change-Id: I1f77062466e3672ce742b6a46e3c39b35ce70f31
2016-07-01 20:29:19 +05:30
Pranav Kant
d60da277e8 loolwsd: Follow symlinks while copying fonts into systemplate
Change-Id: Iee7f5b1dd3cb1884ac51f58c1b6c1ba2b73a7c30
2016-06-29 19:44:34 +05:30
Andras Timar
cdf14cea3e loolwsd: remove libmysqlclient18 from deb package dependencies 2016-06-28 10:10:37 +02:00
Pranav Kant
0f23d617ca loolwsd: Fix incorrect WOPI PutFile path in logs
Change-Id: I90f0cd249b1b32593e16801a3c78daa128aa6d71
2016-06-28 12:11:25 +05:30
Ashod Nakashian
b7e0766fea loolwsd: removed lo_jail_subpath
Really unused setting that caused deployment complications.

Change-Id: If837fca4c904e82b23babd4a1f0f3f15b5ef57f4
Reviewed-on: https://gerrit.libreoffice.org/26705
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-27 12:29:55 +00:00
Andras Timar
6620502229 loolwsd: fix run_valgrind target with new command line options 2016-06-27 09:45:29 +02:00
Andras Timar
f540fb087c loolwsd: document new command line options in READMEs 2016-06-27 09:41:41 +02:00
Andras Timar
93e1104505 loolwsd: use the new command line options in spec file for default admin 2016-06-27 09:27:25 +02:00
Andras Timar
c3db6d719e reserve version 2.0.0 for actual release... 2016-06-27 09:20:09 +02:00
Andras Timar
e85179e0f8 loolwsd: let loolwsd.service use the new command line options 2016-06-27 09:15:40 +02:00
Andras Timar
8b07403629 loolwsd: use LOOLWSD_CONFIGDIR and LOOLWSD_CACHEDIR in default config 2016-06-27 07:37:04 +02:00
Ashod Nakashian
e8cd9e35d3 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Unit tests updated with new command-line arguments.

Change-Id: I1a391255c44d4d22b8304129634ef7d16b606bce
Reviewed-on: https://gerrit.libreoffice.org/26683
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 20:45:12 +00:00
Ashod Nakashian
d281813c06 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Removed admin-console creds and allow-local-storage.

Change-Id: If281b6320caee5d28007063591325eb98ba8e01b
Reviewed-on: https://gerrit.libreoffice.org/26670
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:31:00 +00:00
Ashod Nakashian
6501a21114 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Remove command-line arguments in favor of the config file.

Settings can be overridden using the command-line flag
--override (or --o) followed by the full XML path=value.

Change-Id: I902a145f4d2bd0256e31a3e70b0382c0261aecc8
Reviewed-on: https://gerrit.libreoffice.org/26669
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:29:28 +00:00
Ashod Nakashian
8798943f08 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Support overriding config settings via the command-line.

By using --o:name=value (or --override:name=value) the
setting called 'name' can be replaced by 'value'.

Ex. --o:per_document.max_concurrency=12

The above will override the max_concurrency to 12,
regardless of what the XML has set.

Change-Id: If7ffa5dcdc9ce2a8d1a89c8203b8ba870cb624ac
Reviewed-on: https://gerrit.libreoffice.org/26668
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:27:57 +00:00
Ashod Nakashian
7d4d7f47ac bccu#1909 - loolwsd command line options vs. config file and package upgrades
Default config entries and values are now set before loading
the config file from disk. This ensures that an upgrade
to the server with new config entries will not break the
server when the XML is not upgrade, rather, the server
will fallback to the defaults when it fails to find the
entry in the XML.

This, of course, requires adding new entries to the
default entries every time config entries are changed.

Change-Id: Iac849dc41fc7410a3c9093b0d6e91d96182b86fd
Reviewed-on: https://gerrit.libreoffice.org/26667
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:27:21 +00:00
Ashod Nakashian
0832453649 loolwsd: disable webdav in config and add defaulting comment
Change-Id: Id79263c8a9190d294868249e61c747d1454cddf5
Reviewed-on: https://gerrit.libreoffice.org/26666
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:26:45 +00:00
Pranav Kant
42ebabb3a9 Update bundled headers
Change-Id: Ifa69fec15df328d97d5d2c207dcd47c0d3ff660d
2016-06-22 14:52:07 +05:30
Mike Kaganski
47a17fa8d0 testCloseAfterClose: don't hang on bytes==0 && flags==0
At least in some versions of Poco (namely, 1.7.3),
WebSocketImpl::receiveBytes may return both bytes and flags equal
to zero. It makes the HTTPWSTest::testCloseAfterClose() loop
exit condition to never happen, thus test hangs.

According to WebSoket.h, "A return value of 0 means that the peer
has shut down or closed the connection".
Thus, this modification makes this loop robust.

Change-Id: I5dd4f30936dd8246c966f094f2fdae9a45b89ff9
Reviewed-on: https://gerrit.libreoffice.org/26547
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-21 23:07:35 +00:00
Pranav Kant
8bba9da761 Make new version string as a JSON string
... easy to differentiate on client side among various version
info parts, especially for LOKit version information.

Change-Id: I4ba18c60367fb9166462b535bc46953a82a8435d
2016-06-21 22:12:48 +05:30
Andras Timar
bc4633a2a1 loolwsd: avoid NotFoundException when per_document.max_concurrency is missing (old config) 2016-06-21 16:15:53 +02:00
Pranav Kant
31009fa9c1 loolwsd: Handle document URIs with spaces
DocumentBroker stores encoded docKey, when child answers with
dockey in its query params, Poco::URI::getQueryParameter gives
decoded docKey -> mismatch -> document load failed.

Change-Id: I53d7cf9d932b9193f15f56ec74db24e279cf3b94
2016-06-21 16:06:12 +05:30
Pranav Kant
b83ac269fa loolwsd: Send LOKit version information to clients
Send as a response to 'loolclient' message received from the
client

Change-Id: I3d33f9fd087489aa9bf5a94f591ab04e208cbf13
2016-06-21 00:30:36 +05:30
Pranav Kant
e271995ed2 loolwsd: Restructure version information functions
... so that version information can be sent to clients.

Change-Id: Icc90f31fabb501f816ff1dca0c618a73660c88bc
2016-06-21 00:29:41 +05:30
Ashod Nakashian
d1d9ec6168 loolwsd: max_concurrency setting added
Change-Id: Iae3789d26ed2e1aba3806a6f99511fa6c7097988
Reviewed-on: https://gerrit.libreoffice.org/26449
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17 23:59:47 +00:00
Ashod Nakashian
bf66f7a908 loolwsd: Calc tile rendering test with editing
Change-Id: Ib02a079bf1e4e90c7dfb65b6038b3ca1423a673c
Reviewed-on: https://gerrit.libreoffice.org/26448
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17 23:56:26 +00:00
Miklos Vajna
5e1b210891 Util: pass by const ref 2016-06-17 09:18:26 +02:00
Miklos Vajna
75db2dd33b loolwsd: disable unit-fonts for now as it's unstable 2016-06-16 13:45:20 +02:00
Miklos Vajna
3c32bc1724 LOOLKit: fix loss of callback during initializeForRendering()
Impress deletes the current view and creates a new one during that call,
so make sure at the end our registered callback is not lost. With this,
the order matches how it's done in gtktiledviewer.

This fixes the HTTPWSTest::testInsertDelete() test when per-view
callbacks are enabled.

Also remove the assert from TileCacheTests::testTileInvalidateWriter()
that would assume something is invalidated right after load: the hope is
that it's possible to load a document without invalidating anything...
:-)
2016-06-16 12:15:11 +02:00
Miklos Vajna
70f5b914f6 TileCacheTests: assert before possible nullptr deref / div by zero 2016-06-15 18:04:57 +02:00
Miklos Vajna
afb6a7ebb0 Util: turn TerminationFlag into an std::atomic<bool>
Running unit-fonts under helgrind points out missing synchronization
there.
2016-06-15 15:31:41 +02:00
Miklos Vajna
9ac53ef5f5 TileCacheTests: disable testTileInvalidateCalc for now
It fails for me and Ashod as well.
2016-06-15 15:30:37 +02:00
Miklos Vajna
f64534404c loolwsd: document setclientpart command
At least I guess this is the purpose of it, based on commit
b9884a470a (loolwsd: be aware of the
client's current part, 2015-07-21).
2016-06-15 14:31:52 +02:00
Mike Kaganski
9ef285cc33 loolwsd unit test: invalidate tiles while typing
This test simulates characters and combined characters being
typed to loolwsd, and verifies that each causes tile(s)
invaliations

Change-Id: I670659de3a9eb71e94c366c96e69e6efd4338c38
Reviewed-on: https://gerrit.libreoffice.org/24928
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-14 22:20:36 +00:00
Pranav Kant
257b95f01f bccu#1871: Add url prefix, lool, to post requests
All post requests will now have to be prefixed with /lool/

This is necessary to ease proxy url redirection setup.

Change-Id: I04fbc211879722f6433cb9eb17786f394187a1b9
Reviewed-on: https://gerrit.libreoffice.org/26091
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-06-09 11:22:05 +00:00
Pranav Kant
8cc367638f bccu#1871: Add url prefix to websocket urls
Normal websocket connections are now :
/lool/ws/filename

Admin websocket is now :
/lool/adminws/

Change-Id: If39382cb852d89ed0394adbd7fe168fe4767a075
Reviewed-on: https://gerrit.libreoffice.org/26029
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-06-08 14:06:20 +00:00
Miklos Vajna
f209773f0a loolwsd: fix naming style of static members
README suggests not using an initial underscore for those. Rename the
few cases which don't respect this recommendation.

Change-Id: If36a36da9374597f6b9090e7f81a1b3fb2f23647
2016-06-07 09:18:49 +02:00
Ashod Nakashian
3b6009fa56 loolwsd: fixed testLoad12ods
Change-Id: Iec0bb481da7af71b210463613617a7272209bfb3
Reviewed-on: https://gerrit.libreoffice.org/25947
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-06 01:55:18 +00:00
Ashod Nakashian
6b1a57c9eb loolwsd: improved random directory generator
Change-Id: I611debe9cd33b8b15c2fab3c49ad19cc6ad6a995
Reviewed-on: https://gerrit.libreoffice.org/25946
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-06 01:54:45 +00:00
Andras Timar
7e625d5f42 loolwsd: respect server_name setting 2016-06-05 16:38:48 +02:00
Pranav Kant
3042580873 loolwsd: Increase timeout for admin test
... to 60 seconds. This one contains a lot of sub-tests. Further,
loolwsd shutdown is consuming approx. 15 seconds out of this
limit. The default 30 seconds, hence, is not enough for this one.

Change-Id: I0c29c92f6be0140cb62b58dacb57392e264d7f30
2016-06-01 21:58:07 +05:30
Pranav Kant
4c053e864f loolwsd: unit-admin: More debug info
Change-Id: I0a529915ab9383ce05a76b8291651663324c8fe8
2016-06-01 14:57:35 +05:30
Pranav Kant
b58801c6b0 loolwsd: unit-admin, log when test passes
Change-Id: I9714a8dc57b22ecff3ef4a421192d08a8f3f10e1
2016-06-01 14:57:35 +05:30
Henry Castro
2df8d928dc loolwsd: remove unique_ptr to call std:free
It is recommended that if you allocate with malloc() it should
be deallocated with free()
2016-05-31 10:16:47 -04:00
Ashod Nakashian
886af28bc2 loolwsd: improved random directory generator
Change-Id: Ic4ea88ba77549cc4ccba83c27fffdffcdeebb984
Reviewed-on: https://gerrit.libreoffice.org/25698
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-31 04:24:25 +00:00
Ashod Nakashian
8f3dcbcfb6 loolwsd: more secure random directories
Util::createRandomDirectory now uses /dev/urandom
(and a complex pseudo-random generator where missing)
to generate 64-byte long, Base64-encoded, names.

This should provide ample security compared to 64-bit
pseudo-random numbers hex-encoded, as was the case.

Change-Id: I714810a9fb03b5dcdbad7a15305940bf7457149e
Reviewed-on: https://gerrit.libreoffice.org/25696
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-31 00:57:52 +00:00
Henry Castro
58580a45ce loolwsd: test: update unit test getPartHashCodes 2016-05-30 20:26:40 -04:00
Henry Castro
19acaecfc7 loolwsd: bccu#1748, status: message send both ...
the partnames and hashes (for presentations)
2016-05-30 20:20:26 -04:00
Andras Timar
c542fedd0c loolwsd: add robots.txt (compliance) 2016-05-30 17:40:52 +02:00
Ashod Nakashian
c005f765bf loolwsd: reuse the same callback for now
Change-Id: I0f5ff42ed8c3ab422909d185089bfc31d5bb298b
Reviewed-on: https://gerrit.libreoffice.org/25663
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-30 11:29:10 +00:00