1
0
Fork 0
Commit Graph

2384 Commits

Author SHA1 Message Date
Felix Weilbach 0af83dd1b6 Use QRandomGenerator instead of qrand
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
Felix Weilbach 2fe3a7947e endl has been deprecated
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-08 08:54:00 +00:00
Matthieu Gallien 95e3ecfd3c prevent infinte recursion when closing a websocket in case of SSL errors
the slots connected to the web socket can be called even during close
and lead to infinite calls to close -> error slot -> close -> ...

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-09-07 07:09:43 +00:00
Felix Weilbach 031b2e0683 Remove assert that caues crashes
This assert does not add value. Utility::concatUrlPath() takes care of
appending paths correctly.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-09-06 15:54:44 +00:00
allexzander a3fc812539 Enable share to Talk and Email. Display correct icon. Added unit tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-09-06 13:27:39 +00:00
Matthieu Gallien d17d831205 switch from Q_DECL_OVERRIDE to plain override
our requirements guarantee availability of override keyword so we just
use it

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-31 08:35:57 +00:00
Matthieu Gallien 25669938fd let clang-tidy add missing override after enabling again the check
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-31 08:35:56 +00:00
Felix Weilbach 23fca8019b Add parens around && in || statement
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-26 15:52:25 +00:00
Felix Weilbach 4d72d375f2 Fix warnings related to wrong ordering of ctor init
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-26 15:52:25 +00:00
Matthieu Gallien 601c4fb3c0 remove a tr call where translator cannot do anything meaningful
close #3708

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-26 15:26:54 +00:00
Matthieu Gallien 22a5fadc13 remove broken assert that is not needed and break account setup
it has been also removed from the original branch so no problem removing
it

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-23 14:13:58 +02:00
Matthieu Gallien 0456cacd79 fix clang-tidy check for usage of =default
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-08-23 09:44:34 +02:00
Hannah von Reth 4b0122093a Add socket command to upload a selection of files based on a regex
(cherry picked from commit 0ded3a56a9f3470a951b18eaa9d3c1b5e8db1135)
2021-08-23 09:44:34 +02:00
Hannah von Reth 010fccb4fa Remove dead code 2021-08-23 09:44:34 +02:00
Christian Kamm ebaa98fa7a owncloudcmd: Use env vars for chunk sizes #7078
Moves a bunch of env var reading from Folder into SyncOptions.
2021-08-23 09:44:34 +02:00
Hannah von Reth 10e02b0031 Don't create QStringList copy first 2021-08-23 09:44:34 +02:00
Hannah von Reth 44fa4aad88 Always call doLog to ensure we get a crash log 2021-08-23 09:44:34 +02:00
Hannah von Reth 1ff3a0f8b6 Remove anchient debug msg that mutated to a warning over the year 2021-08-23 09:44:34 +02:00
Hannah von Reth 6324ac9cac Cleanup members 2021-08-23 09:44:34 +02:00
Hannah von Reth df567efd37 Remove dead code 2021-08-23 09:44:34 +02:00
Hannah von Reth 990ce6ed05 Dump the last 20 lines of logs to a file when we crash
Fixes: #8467
2021-08-23 09:44:34 +02:00
Hannah von Reth 48f4c1e9e1 Log fallback result 2021-08-23 09:44:34 +02:00
Hannah von Reth acd83a2998 Ensure unit test are using absolute paths 2021-08-23 09:44:34 +02:00
Hannah von Reth 1eee5c849e Add assert to ensure we used _remotePath as base 2021-08-23 09:44:34 +02:00
Hannah von Reth 6c1073db92 Fix another url for etag request
Fixes: #7838
2021-08-23 09:44:34 +02:00
Hannah von Reth 5b457a1663 Use byte array for etag 2021-08-23 09:44:33 +02:00
Hannah von Reth d16befd1fd Align MkColJob finish signal with the other jobs 2021-08-23 09:40:27 +02:00
Hannah von Reth cb57d8e54c Add missing Q_EMIT 2021-08-23 09:40:27 +02:00
Hannah von Reth 789e0e45d5 Fix Windows long path issue introduced in dd641fae997d71c8396b77def2fa25ad96fdf47f 2021-08-23 09:40:27 +02:00
Hannah von Reth a72ff9ea7f Set permissions for new folder 2021-08-23 09:40:26 +02:00
Hannah von Reth 90b733801e Simplify uuid handling 2021-08-23 09:40:26 +02:00
Hannah von Reth 557b11aca7 Include os version 'windows-10.0.19042' in about dialog 2021-08-23 09:40:26 +02:00
allexzander ba73b6d914 VFS + E2EE. Improved data alignment and unit tests for StreamingDecryptor. Refactoring and renaming for readability.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander 289df252b5 VFS + E2EE. Handle scenario of sync journal deleted.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander c28cac8479 VFS + E2EE placeholder size migration from old versions.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander 2c78925acb VFS + E2EE VFS implicit hydration of E2EE files.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 12:57:22 +00:00
allexzander b6d216b794 Use separate arguments for a remote root and do not use dav or webdav in the server's URL
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-20 13:30:35 +03:00
Felix Weilbach 3d72e24bb8 Brand name of vfs plugins
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-19 10:30:24 +00:00
Nicolas Fella 43cccb0a73 Don't use variables for CMake target identifiers
This makes the code a bit nicer to read and maybe a bit more robust.

Set the relevant OUTPUT_NAME target properties to keep the ability to
customize the names of the installed binaries.

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2021-08-19 10:30:23 +00:00
Felix Weilbach acf6cc0527 Remove unused functions and variables
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 20:20:39 +00:00
Felix Weilbach d72f7e9109 Check result of setPinState()
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 20:20:39 +00:00
Hannah von Reth 6e0a43b570 Fix clash detection with virtual files
Fixes: #8323
2021-08-11 17:13:44 +00:00
Hannah von Reth 45f3a97997 Small cleanup 2021-08-11 17:13:44 +00:00
Hannah von Reth 989390bc41 Don't shadow 2021-08-11 17:13:44 +00:00
Hannah von Reth d60eb67c2e Also prepend appName if id is empty 2021-08-11 17:13:44 +00:00
Hannah von Reth 8468e70cba Use QKeychain:: explicitly 2021-08-11 17:13:44 +00:00
Hannah von Reth 926a52b33d Remove unused computation 2021-08-11 17:13:44 +00:00
Hannah von Reth ec0466ed73 Allow to add and remove log rules 2021-08-11 17:13:44 +00:00
Felix Weilbach f9daa27a5d Enforce fetching of user id
With the change of commit 3e61bdc431 and
the relase of v3.3.0 users that had their email address used as login
are not able to login anymore. The dav_user should be empty if users
tried to create a account in the meantime. Therefore we fetch the user
id in the case dav_user (and then Account::_davUser) is empty. We then
store the user id in dav_user.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 16:16:12 +00:00
allexzander 4106c646f9 Fix incorrect activity message on invalid char in the file name.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-04 13:22:17 +03:00
allexzander c930d8e30f Delete apptoken after account removal.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-04 09:37:40 +00:00
rakekniven 37b012fcbd Changed grammar
Reported at Transifex.

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2021-08-02 06:40:50 +00:00
szaimen 2c95b9519c Set default maxChunkSize to 1000MB
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-07-30 07:00:09 +00:00
Valdnet 7ebbb499e0 l10n: Replace apostrophe with double quotation
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-07-30 06:21:05 +00:00
Matthieu Gallien 391935c90f prevent crash in Accont::davPath without credentials
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-29 08:27:53 +00:00
Matthieu Gallien c40d276770 remove dead code around overriding dav path in URL
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-28 12:12:17 +02:00
Matthieu Gallien 77433f7e1d in wizard always use the correct way to get dav path
fixes listing being incorrect when using dav endpoint

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-28 09:45:49 +00:00
allexzander 8122c63ebc Revert Added config parameter that allows to bypass checksum validation failure.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-28 07:57:10 +00:00
Felix Weilbach 3e61bdc431 Use dav instead of webdav
Fixes #3342

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-07-16 12:42:02 +00:00
Felix Weilbach efaccbd6fd Show main dialog as normal window if tray icons not available
Fixes #3307

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-07-12 14:10:26 +00:00
Matthieu Gallien 2ee26bbd59 fix review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-12 14:31:19 +02:00
Matthieu Gallien 7c68408ee1 only compile xattr virtual files backend for linux platform (not unices)
for a reason a mac os platform specific file is missing and before xattr
plugin was compiled only for linux

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-12 14:10:54 +02:00
Matthieu Gallien d2f2e3305a avoid being stuck trying to create placeholder for existing file
id sync db think a file is cirtual (empty placeholder) but file system
has a real file (non empty file) once the server has a modified version
we can no longer update it

state of file on disk takes precedence over sync DB to allow recovery

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-09 12:37:47 +00:00
Matthieu Gallien 8ad6f89fed bring back dynamic load of VFS plugins
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-08 08:11:17 +00:00
Matthieu Gallien c123edb173 address review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-06 14:16:43 +00:00
Matthieu Gallien 4016c2fab0 avoid error when doing hydration when data socket is closed too early
when data is received, if we close the socket they cannot be read

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-06 14:16:43 +00:00
Hannah von Reth e7e218d8e6 Improve the error message returned by updateMetadata
Also properly handle the case the the file can't be converted to a placeholder
as it is locked
2021-07-06 14:03:53 +00:00
Matthieu Gallien 8f5b88acd5 improve error message in case of trailing space in directory name
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-02 10:50:31 +00:00
Matthieu Gallien 746072e95d fix all usage of _com_error(cfExecuteresult).ErrorMessage()
_com_error(cfExecuteresult).ErrorMessage() calls should be translated to
QString before use with qDebug and related logging facilities

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-02 11:19:04 +02:00
Matthieu Gallien 2bc72592a0 fix review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-01 14:40:25 +02:00
Matthieu Gallien 698d5f19ba download server public key and check user certificate against it
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-01 14:07:27 +02:00
allexzander 99f6e82290 Fix review comments.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-01 11:59:21 +03:00
allexzander 6ce5279b6c Fix review comments.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-01 11:59:21 +03:00
allexzander 22eba41cb8 Do not process non-directories and non-virtual files. Wipe empty online-only folder based on its pinState.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-01 11:59:21 +03:00
allexzander c5982143aa Refactoring.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-01 11:59:21 +03:00
allexzander 48aefc1983 Fix VFS crash and false conflict on local new.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-07-01 11:59:20 +03:00
Felix Weilbach c9715db720 Check if first is not empty
If it's not checked that first is empty, crashes may happen.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-30 06:57:41 +00:00
Felix Weilbach 2ee3ca02a4 Add unit test for move custom remote root
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-25 10:14:29 +00:00
Felix Weilbach 8376b99ec5 Allow to compile without QWebEngine
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-24 15:43:51 +00:00
Valdnet 3937595eef l10n: Spelling unification
Spelling unification in Transifex.

Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-06-17 12:18:00 +00:00
Felix Weilbach c799dbdd61 Cfapi: Make sure no data is transfered after cancellation
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-17 09:10:06 +00:00
Hannah von Reth 03182ea714 Use longWinPath in more places 2021-06-16 10:54:07 +00:00
Camila f3c17c747a Fix compiling warning: multiple definitions of stateOnlineImageSource in theme.h.
Signed-off-by: Camila <hello@camila.codes>
2021-06-16 07:55:33 +00:00
allexzander a3d12a616b Add error message to GUI.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-15 14:33:45 +03:00
allexzander 6312f6ddde Wipe empty folder when moving a VFS placeholder. Keep a folder if there are hydrated items inside.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-15 13:19:35 +03:00
Felix Weilbach a89a84ff14 Mark placeholder in sync after updating the placeholder
Fixes #3403 #3082 #3391

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-06-14 13:40:26 +00:00
allexzander dc72686ab3 Allow download with mismatched checksum if a config option is set.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-10 13:39:11 +03:00
allexzander bb55232e8e VFS freeze fix. Treat .sync-exclude.lst as a non-virtual file always.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-08 09:25:43 +00:00
AJ Jordan a51d0a14db Improve error message
This one is more user-friendly and grammatically correct.

Signed-off-by: AJ Jordan <alex@strugee.net>
2021-06-03 11:25:47 +00:00
allexzander bf39f053c4 Fix review comments.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-01 13:51:02 +00:00
allexzander a80c58f367 Bugfix. Crash when printing OpenSSL decryption errors with no e2ee mnemonic.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-06-01 13:51:02 +00:00
Matthieu Gallien 7fb09a8163 check e2ee public key against private one
should ensure we have matching private/public keys

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-05-27 07:26:48 +00:00
Camila 671b099c98 Check if the user is connected and if the server supports user status.
Signed-off-by: Camila <hello@camila.codes>
2021-05-25 06:55:52 +00:00
Felix Weilbach 78f1943d76 Add a key value store to the sync journal
This key value store should help to keep track of important events,
that can not be store in the logs, because the logs are deleted too fast.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-19 09:04:43 +02:00
Felix Weilbach 32b7e62359 Warn user if using e2ee and vfs together
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-18 11:50:18 +00:00
allexzander 76be5dce73 Add remote folder prefix for renaming in a non-root local folder.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-05-17 12:19:58 +00:00
Felix Weilbach c3a2587a91 Remove unnecessary cfapi logging statements
For big files that can add a lot lines to the log files.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-12 08:49:13 +00:00
Hannah von Reth 17a1a630a4 Use the http logger with the unittests
This allow better debugging of the tests

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-05-06 07:35:59 +00:00
Hannah von Reth e04c6abcd5 Fix placeholder detection for cfapi
Fixes: #8326
Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2021-05-06 07:35:59 +00:00
allexzander d754bb7102 Fix review comments.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-05-06 06:17:36 +00:00