Kevin Ottens [Wed, 15 Jul 2020 11:05:11 +0000 (13:05 +0200)]
Allow to override the parallelism
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 15 Jul 2020 11:03:55 +0000 (13:03 +0200)]
Move PropagateRemoteMkdir ctor to the cpp file
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 15 Jul 2020 09:23:11 +0000 (11:23 +0200)]
Make sure the tray icon point is in screen coordinates
Previously we were using QCursor::pos() in the Linux case, which is a
fair heuristic except it will always be relative to the primary screen
and not the current screen. This explains why we had to adjust with the
virtual geometry.
In the Windows and Mac case we got the position out of QSystemTrayIcon
and that one was already relative to the current screen.
So now we use QCursor::pos(currentScreen()) which ensures we give the
coordinates relatively to the current screen also in the Linux case.
Since all platforms are now having that point in the same coordinate
system we don't need to mess around with the virtual geometry to
compensate.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Nextcloud bot [Wed, 15 Jul 2020 03:57:54 +0000 (03:57 +0000)]
[tx-robot] updated from transifex
Nextcloud bot [Tue, 14 Jul 2020 03:29:35 +0000 (03:29 +0000)]
[tx-robot] updated from transifex
Kevin Ottens [Mon, 13 Jul 2020 16:04:28 +0000 (18:04 +0200)]
Merge pull request #2188 from nextcloud/upgrade-syncjournaldb-to27
Move existing syncjournal db files from client ver <2.7
Dominique Fuchs [Mon, 13 Jul 2020 12:02:49 +0000 (14:02 +0200)]
Fix typo, use compound assignment op
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Dominique Fuchs [Sun, 12 Jul 2020 08:13:14 +0000 (10:13 +0200)]
Only attempt to move if file exist
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Dominique Fuchs [Sat, 11 Jul 2020 22:08:46 +0000 (00:08 +0200)]
Move existing syncjournal db files from client ver <2.7
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Nextcloud bot [Sun, 12 Jul 2020 03:29:20 +0000 (03:29 +0000)]
[tx-robot] updated from transifex
István Váradi [Sat, 11 Jul 2020 13:18:08 +0000 (15:18 +0200)]
Fetch tags for Debian build
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
Nextcloud bot [Sat, 11 Jul 2020 03:29:57 +0000 (03:29 +0000)]
[tx-robot] updated from transifex
Nextcloud bot [Fri, 10 Jul 2020 03:33:30 +0000 (03:33 +0000)]
[tx-robot] updated from transifex
Nextcloud bot [Thu, 9 Jul 2020 23:51:47 +0000 (23:51 +0000)]
[tx-robot] updated from transifex
Michael Schuster [Thu, 9 Jul 2020 21:36:13 +0000 (23:36 +0200)]
Merge pull request #2183 from nextcloud/fix-delete-base-folders-instr
Prevent empty FileMap in local csync to be processed if folder not empty
Dominique Fuchs [Thu, 9 Jul 2020 19:47:34 +0000 (21:47 +0200)]
Merge branch 'fix-delete-base-folders-instr' of https://github.com/Nextcloud/desktop into fix-delete-base-folders-instr
Dominique Fuchs [Thu, 9 Jul 2020 19:47:19 +0000 (21:47 +0200)]
Remove debug variable
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Dominique Fuchs [Thu, 9 Jul 2020 19:38:11 +0000 (21:38 +0200)]
Merge branch 'master' into fix-delete-base-folders-instr
Dominique Fuchs [Thu, 9 Jul 2020 19:23:24 +0000 (21:23 +0200)]
Prevent empty FileMap in local csync to be processed if folder not empty
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Kevin Ottens [Thu, 9 Jul 2020 10:56:19 +0000 (12:56 +0200)]
Properly register folder as encrypted during sync
Turns out that when we added a new e2e folder during sync, we were
passing the wrong path to the e2e object. We have several path
convention in the sync code, just happened to be the wrong one.
I still long for the day when we'll use the type system to deal with
paths. All those strings are error-prone.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 9 Jul 2020 10:17:42 +0000 (12:17 +0200)]
Recover from missing metadata on uploads
Other clients seem to allow creating empty encrypted folders with no
metadata associated to them, so let's get ready to handle it. In case of
a 404 to get the metadata, we create an empty metadata payload and pass
it further down.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 9 Jul 2020 07:54:39 +0000 (09:54 +0200)]
Change the separator in the private key
It used to be a base64 encoded '|', now it is still a '|' but not
encoded, let's adjust accordingly.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 15:09:53 +0000 (17:09 +0200)]
Prevent parallelism when deleting encrypted files
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 14:48:06 +0000 (16:48 +0200)]
Unlock the folder only after we actually deleted the file
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 14:22:57 +0000 (16:22 +0200)]
Allow to specify the e2e-token on DeleteJob
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 14:18:08 +0000 (16:18 +0200)]
Stop unlocking from within PropagateRemoteDeleteEncrypted
We need to finish deleting the file before we can actually unlock. Also
the token will be necessary for the delete to succeed.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 13:35:39 +0000 (15:35 +0200)]
Compare the unencrypted filename with the originalName
Otherwise obviously we'd never find the files in the metadata.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 13:35:02 +0000 (15:35 +0200)]
Use the encrypted path for collection listing
If we use the local path we'll get a 404.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 13:16:53 +0000 (15:16 +0200)]
Pass e2e-token to PropagateUpload subjobs
The headers() method is used to pass extra headers to the PUT jobs for
instance, definitely needed for uploads now.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 13:16:27 +0000 (15:16 +0200)]
Pass the e2e-token for encrypted MKCOL
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 13:14:18 +0000 (15:14 +0200)]
Allow to pass extraHeaders to a path based MkColJob
We could specify the extra headers with a URL but not a simple path.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 8 Jul 2020 12:43:18 +0000 (14:43 +0200)]
E2EE RFC has been updated to use e2e-token instead of token
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Michael Schuster [Thu, 9 Jul 2020 04:16:18 +0000 (06:16 +0200)]
Merge pull request #2177 from nextcloud/fix-issue-2175
Share link display the correct permissions for files and folders.
Camila [Wed, 8 Jul 2020 18:28:42 +0000 (20:28 +0200)]
Fix text in the permissions menu for share link.
Changed word capitalization and replace && for andi to match the server.
Signed-off-by: Camila <hello@camila.codes>
Camila [Wed, 8 Jul 2020 17:53:45 +0000 (19:53 +0200)]
Share link display the correct permissions for files and folders.
- Fix #2175:
- Shows the correct default permissions
- Shows the permissions the user set
Signed-off-by: Camila <hello@camila.codes>
Michael Schuster [Thu, 9 Jul 2020 03:19:56 +0000 (05:19 +0200)]
Merge pull request #2168 from nextcloud/display-default-permissions-share
Display the correct default permissions when creating a share.
Camila [Tue, 7 Jul 2020 18:40:51 +0000 (20:40 +0200)]
Display the correct default permissions when creating a share.
- The default displayed was not in sync with the server because
the client was setting permissions when creating a share while it
should get the default permissions from the server to display it to the
user first.
Signed-off-by: Camila <hello@camila.codes>
Stephan Beyer [Tue, 7 Jul 2020 07:43:22 +0000 (09:43 +0200)]
Use braced initializer list for returns in Systray::taskbarGeometry()
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Tue, 7 Jul 2020 07:10:48 +0000 (09:10 +0200)]
Make csync_file_stat_s::isE2eEncrypted a bitfield
This is in line with other bools of that struct and gets rid
of clang-tidy's modernize-use-default-member-init warning.
(The trivial alternative to get rid of that warning would be
to use default member init for that bool variable, but I think
it is better to have it as a bitfield.)
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Tue, 7 Jul 2020 07:40:33 +0000 (09:40 +0200)]
Remove redundant initialization of ElidedLabel::_elideMode
The value gets already initialized by default member initialization,
so there is no need to set it again in the constructor.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Tue, 7 Jul 2020 07:36:30 +0000 (09:36 +0200)]
Remove redundant initialization of HttpCredentials::_keychainMigration
The value gets already initialized by default member initialization,
so there is no need to set it again.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Tue, 7 Jul 2020 07:20:12 +0000 (09:20 +0200)]
Remove redundant initialization of SyncFileStatus::_shared attribute
The value gets already initialized by default member initialization,
so there is no need to set it again in the copy constructor.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Tue, 7 Jul 2020 07:31:01 +0000 (09:31 +0200)]
Use default member init for PKeyCtx::_ctx and PKey::_pkey
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Tue, 7 Jul 2020 07:39:27 +0000 (09:39 +0200)]
Use more auto in folderstatusdelegate.cpp
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Tue, 7 Jul 2020 06:51:05 +0000 (08:51 +0200)]
Filter clang-tidy output on Drone for errors
The run-clang-tidy is very verbose and prints a lot of unneccessary
information. This commit greps for errors in the output.
Moreover, we add the -quiet switch.
As a desired "side" effect, this commit repairs the issue of
run-clang-tidy-6.0 that it does not return a usable exit code.
Hence clang-tidy errors will lead to CI failures now.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Stephan Beyer [Mon, 6 Jul 2020 23:22:59 +0000 (01:22 +0200)]
Simplify clang-tidy invocation for Drone
Symlinking and running bash is not necessary.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Kevin Ottens [Wed, 8 Jul 2020 09:18:07 +0000 (11:18 +0200)]
Adjust to makeDbName returning an absolute path
PR #1451 changed the behavior of makeDbName which now returns an
absolute path. This obviously then failed in nextcloudcmd which
prepended to it the path to the local folder to sync. We just stop doing
this to have the journal db end up at the right place in that case as
well.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Nextcloud bot [Wed, 8 Jul 2020 03:40:45 +0000 (03:40 +0000)]
[tx-robot] updated from transifex
Kevin Ottens [Mon, 6 Jul 2020 12:16:28 +0000 (14:16 +0200)]
Handle properly null avatar
If we try to produce the avatar before we managed to connect we'd end up
trying to paint in a null image. Just return early, which will allow the
caller to do something else instead.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 7 Jul 2020 16:06:19 +0000 (18:06 +0200)]
Merge pull request #2167 from nextcloud/fix_url_decoding_for_folder_encryption_status
Fix url decoding for folder encryption status
Kevin Ottens [Tue, 7 Jul 2020 14:50:31 +0000 (16:50 +0200)]
Decode the href from the XML payload
The XML we get as reply has href entities properly percent encoded.
Since we didn't go through QUrl next we didn't get a properly decoded
version. Make sure we decode it before storage.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 7 Jul 2020 14:43:55 +0000 (16:43 +0200)]
No need to compute base at each loop run
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Stephan Beyer [Mon, 6 Jul 2020 18:12:58 +0000 (20:12 +0200)]
Set maximum height of account and app menu
The menus may become too large if they have too many items
(the account menu has this in case of many accounts, the apps
menu in case of many apps). This commit limits the maximum
height such that the menus do not hide the header.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Nextcloud bot [Tue, 7 Jul 2020 03:34:53 +0000 (03:34 +0000)]
[tx-robot] updated from transifex
Stephan Beyer [Mon, 6 Jul 2020 21:48:51 +0000 (23:48 +0200)]
Merge pull request #2159 from nextcloud/fix_appsmenu_binding_loop
Reach out to the contentItem inside of the ListView to find the width
Kevin Ottens [Mon, 6 Jul 2020 12:44:23 +0000 (14:44 +0200)]
Reach out to the contentItem inside of the ListView to find the width
Turns out that the ListView embedded in the Menu (reachable via
contentItem) would create a binding loop if we're using its
childrenRect. But really we're interested in the total width for the
instantiated delegate *inside* the ListView. That's why we go one level
deeper and get the childrenRect of the inner contentItem instead.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Michael Schuster [Mon, 6 Jul 2020 20:36:21 +0000 (22:36 +0200)]
Merge pull request #2127 from nextcloud/fix/proxy-password-storage
ConfigFile security: Migrate Proxy password to keychain
Michael Schuster [Tue, 30 Jun 2020 14:00:29 +0000 (16:00 +0200)]
Cleanup auto pointers and qobject casts, refactor KeychainChunk
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Tue, 30 Jun 2020 04:02:58 +0000 (06:02 +0200)]
ProxyAuthHandler: Add template member function execAwait to avoid code duplication
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Sat, 27 Jun 2020 02:53:37 +0000 (04:53 +0200)]
Keychain: Use auto deletion in WebFlowCredentials and ConfigFile
- Also make use of the new KeychainChunk::DeleteJob
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Sat, 27 Jun 2020 02:48:57 +0000 (04:48 +0200)]
Refactor KeychainChunk to use QEventLoop and add DeleteJob class
- Use QEventLoop for synchronous exec()
- Rename startAwait() to exec()
- Add code for auto deletion
- Add new DeleteJob class
- Cleanup, tweaks
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Sat, 27 Jun 2020 02:25:36 +0000 (04:25 +0200)]
Refactor ProxyAuthHandler to use QEventLoop
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Thu, 25 Jun 2020 14:59:57 +0000 (16:59 +0200)]
ConfigFile security: Migrate Proxy password to keychain
When specified in the config file, the Proxy password will be migrated
to the keychain, for backward compatibility and to allow admins to
overwrite an existing password by rolling out updated config files.
Once migrated to the keychain, the password will be removed from the
config file.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Thu, 25 Jun 2020 14:52:40 +0000 (16:52 +0200)]
KeychainChunk: Add synchronous method startAwait()
Awaits completion with no need to connect some slot to the finished() signal first,
inspired by the ProxyAuthHandler class.
Also add:
- Job dtor to safely erase passwords
- textData() method
- New ctor overloads to work with arbitrary keys (without Account ptrs)
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Wed, 24 Jun 2020 23:08:59 +0000 (01:08 +0200)]
Move KeychainChunk class from gui to libsync
Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster [Wed, 24 Jun 2020 22:30:41 +0000 (00:30 +0200)]
Move QKeychain::NoBackendAvailable error handling to KeychainChunk class
Originally this was in the WebFlowCredentials class. Since we've abstracted everything
from there already, let's also move this in case some other code may use
KeychainChunk::ReadJob prior to WebFlowCredentials.
Signed-off-by: Michael Schuster <michael@schuster.ms>
Kevin Ottens [Mon, 6 Jul 2020 11:55:14 +0000 (13:55 +0200)]
Fix the hover for the other menu items
Ultimately we would avoid the code duplication by creating our own
proper QQC2 style instead of directly tuning everything. That's a battle
for another time (more elements would need to be adjusted for that, I
don't want to dilute this branch too much).
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Dominique Fuchs [Wed, 17 Jun 2020 17:39:12 +0000 (19:39 +0200)]
Fix hover cutoff in apps menu
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
asemmar [Thu, 2 Jul 2020 22:04:03 +0000 (00:04 +0200)]
forgot some indent
Signed-off-by: asemmar <anis.semmar@itron.com>
asemmar [Thu, 2 Jul 2020 21:40:27 +0000 (23:40 +0200)]
fixed bad spelling of word 'retreive' except in sqlite dependancy
Signed-off-by: asemmar <anis.semmar@itron.com>
Kevin Ottens [Mon, 6 Jul 2020 06:40:49 +0000 (08:40 +0200)]
Merge pull request #2150 from nextcloud/fix_e2e_moves_handling
Fix e2e moves handling
Kevin Ottens [Thu, 2 Jul 2020 16:19:16 +0000 (18:19 +0200)]
Make sure moves involving e2e are delete + upload
If the file has a mangled name or will end up in a parent directory
known to be encrypted, we stick to the CSYNC_INTRUCTION_NEW instead of
going for CSYNC_INSTRUCTION_RENAME. This way we'll have a delete and an
upload instead of a move command.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 2 Jul 2020 15:24:58 +0000 (17:24 +0200)]
Update the metadata table with encryption info before discovery
When the ClientSideEncryption object is fed, also serialize the
encryption info of the folders inside the metadata table.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 2 Jul 2020 15:22:43 +0000 (17:22 +0200)]
Add isE2eEncrypted column in the metadata table
This will allow to exploit the information of a directory being
encrypted or not during the discovery phase.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 2 Jul 2020 14:37:01 +0000 (16:37 +0200)]
Also deliver the encrypted status via the ClientEncryption signal
This will turn useful for other consumers of that data. The alternative
would be to expose a method breaking all form of encapsulation.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 2 Jul 2020 14:22:48 +0000 (16:22 +0200)]
Move the e2e information fetch even earlier
We used to do it when the propagation starts, let's do it even before
the discovery starts. This way we'll have a chance to exploit the
information during the discovery phase.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 2 Jul 2020 13:58:54 +0000 (15:58 +0200)]
Split the discovery phase out of startSync()
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Nextcloud bot [Mon, 6 Jul 2020 03:24:15 +0000 (03:24 +0000)]
[tx-robot] updated from transifex
Nextcloud bot [Sun, 5 Jul 2020 03:25:01 +0000 (03:25 +0000)]
[tx-robot] updated from transifex
Nextcloud bot [Sat, 4 Jul 2020 03:27:19 +0000 (03:27 +0000)]
[tx-robot] updated from transifex
Nextcloud bot [Fri, 3 Jul 2020 03:29:57 +0000 (03:29 +0000)]
[tx-robot] updated from transifex
Camila [Wed, 1 Jul 2020 19:30:17 +0000 (21:30 +0200)]
Don't display quota information when the user has no quota.
- The code handling the api response was not up to date with the latest
api changes.
- Unlimited quota display: use qint64 to avoid data loss
- Change total with quota: total holds the quota total and not the storage total.
Signed-off-by: Camila <hello@camila.codes>
Camila [Mon, 29 Jun 2020 17:41:51 +0000 (19:41 +0200)]
Fix #2085 new tray menu.
Update systray behavior and context menu:
- left click brings up the new QtQuick based dialogs on all latforms
- right click brings up the new QtQuick based dialog on Mac OS only
- right click brings up a context menu on all other platforms than Mac OS
- "Quit Nextcloud" => "Exit Nextcloud"
- Add "Open main dialog" option.
Signed-off-by: Camila <hello@camila.codes>
Nextcloud bot [Thu, 2 Jul 2020 03:35:35 +0000 (03:35 +0000)]
[tx-robot] updated from transifex
Kevin Ottens [Wed, 1 Jul 2020 17:22:45 +0000 (19:22 +0200)]
Merge pull request #2144 from nextcloud/fix_e2ee_upload_lock_starvation
Fix e2ee upload lock starvation
Kevin Ottens [Wed, 1 Jul 2020 12:12:18 +0000 (14:12 +0200)]
Avoid job parallelism when uploading to an encrypted folder
With the current design of the file upload this necessarily pushed to a
lock starvation on the folder. Indeed you could end up with N jobs
asking for the lock at the same time. So just avoid parallelizing for
now even though it will be slow.
We could try to optimize but that'd require some serious changes to the
sync logic on the jobs... let's stabilize first and optimize later.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 1 Jul 2020 11:20:56 +0000 (13:20 +0200)]
Override parallelism() for uploads
This way we'll be able to control parallelism for upload jobs.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 1 Jul 2020 11:19:08 +0000 (13:19 +0200)]
Move PropagateUpload ctor impl to the cpp file
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 1 Jul 2020 17:10:44 +0000 (19:10 +0200)]
Merge pull request #2139 from nextcloud/fix_e2ee_folder_sync_connection
Fix e2ee folder sync connection
Kevin Ottens [Tue, 30 Jun 2020 16:18:06 +0000 (18:18 +0200)]
Reduce interaction with e2ee folders when in the wizard
During the wizard we currently don't have much information about the
encrypted folders. In particular we can only display their mangled names
which is far from ideal for the user to make an informed choice.
That's why in the wizard we now forbid creation of subfolders in e2ee
folders and we also don't display subfolders of e2ee folders.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 30 Jun 2020 15:47:10 +0000 (17:47 +0200)]
Properly display encryption status for non root folder connection
Since the e2e oracle works only in term of absolute remote paths and
that our model x._path was relative, we need to properly convert.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 30 Jun 2020 15:20:02 +0000 (17:20 +0200)]
Deal properly with encrypted item updates accross connections
In such cases we get a download for which _file is already the demangled
name and _encryptedFileName has the mangled information. This is
different to what we encountered so far where initially _file was
mangled and _encryptedFileName was empty. Let's deal with that case
properly.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 30 Jun 2020 12:19:55 +0000 (14:19 +0200)]
Also use mangled paths when looking for entries below a path
Otherwise on second sync we wouldn't find anything under a mangled path
and just end up thinking said files were removed.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 30 Jun 2020 08:24:40 +0000 (10:24 +0200)]
Also check on mangled names when cleaning up the journal
Otherwise, after a first sync all the mangled entries would be removed
from the journal. On second sync it would be fine because we'd then have
seen the unmangled names because of the local files. Unfortunately
that'd mean reuploading them for nothing or trying to mkdir again on the
server for nothing... with a chance of using differently mangled names
(although I didn't spot it, I can't exclude it never happened).
This also led to weirdly getting stuck during sync when there was more
than one sync point.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 30 Jun 2020 14:04:55 +0000 (16:04 +0200)]
Better separate between absolute and relative paths on uploads
Yes... I still wish this would be all driven by the type system, would be
much less error-prone.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 29 Jun 2020 16:20:23 +0000 (18:20 +0200)]
Better separate between absolute and relative paths on downloads
I wish this would be all driven by the type system instead of
error-prone string concatenation everywhere. That will be for a (much)
later refactoring hopefully.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 29 Jun 2020 16:16:59 +0000 (18:16 +0200)]
Always use an absolute remote path for GetFolderEncryptStatusJob
It turns out this job expected an absolute remote path even in the case
of a subfolder sync point.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 1 Jul 2020 16:57:16 +0000 (18:57 +0200)]
Merge pull request #2145 from nextcloud/repair_and_improve_logging
Repair and improve logging
Kevin Ottens [Wed, 1 Jul 2020 14:10:10 +0000 (16:10 +0200)]
Allow to control logFlush from the config file
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 1 Jul 2020 14:08:13 +0000 (16:08 +0200)]
Allow to control logDir from the config file
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>