Hannah von Reth
38c4d5a406
Cookies: Do set cookies in DetermineAuthTypeJob too
...
As we don't support cookie based authentication anymore we can provide cookies here.
This fixes issues with loadbalancers access policy managers.
2020-12-15 10:59:10 +01:00
Hannah von Reth
f073997aee
Cookies: Don't override cookies with outdated values
...
This code was actually not breaking most cookie handling by accident.
As the raw cookies where not split properly we added cookies with values like
"key: val; key2 = val2; key3 = val3"
When the code was corrected we overwrote the newer values in the jar with
the old ones from a request.
2020-12-15 10:59:09 +01:00
Olivier Goffart
317d3735d7
SocketAPI: fix status after a failure to move
...
Issue #7759
2020-12-15 10:59:09 +01:00
Hannah von Reth
85aefa4232
Sync: Fix handling of virtual files in error state
...
Issue: #7799
2020-12-15 10:59:09 +01:00
Hannah von Reth
5927beb08d
Fix potential null pointer access
...
https://sentry.io/organizations/owncloud/issues/1529161263/events/02509984b5ca42ffb3960d9c9e161414/?project=79001&statsPeriod=14d
2020-12-15 10:59:07 +01:00
Olivier Goffart
a6a0e361c1
fixup test
2020-12-15 10:59:07 +01:00
Hannah von Reth
106a35d242
[SSL] Print warning only if something changed
2020-12-15 10:59:06 +01:00
Hannah von Reth
ba87fc9e78
[SSL] Properly restore user accepted certificats
2020-12-15 10:59:06 +01:00
Hannah von Reth
9564e5e92e
Fix saving of cookies
...
Fixes : #7700
2020-12-15 10:59:06 +01:00
Olivier Goffart
1c10fceacc
SyncEngine: no need to use QAtomicInt
...
This was done because the propagator jobs where running in a thread a long
time ago, but this is no longer the case.
(Also QAtomicInt::load is marked as deprecated now)
2020-12-15 10:59:05 +01:00
Hannah von Reth
b6e8d47644
Use Q_ENUM on AuthType to get the name printed in the log
2020-12-15 10:59:04 +01:00
Hannah von Reth
6c19b02888
Disable http2 support for now
...
Issue: #7610
2020-12-15 10:59:04 +01:00
Olivier Goffart
0e7c56e81c
Don't show the "All files deleted" popup when unselecting everything with selective sync
...
Issue #7337
2020-12-15 10:59:04 +01:00
Olivier Goffart
392d3c257c
Discovery: Allow more HTTP error code to be treated as ignored dir
...
The original code from csync was stopping at any error.
But we have been whitelisting soeme http error code one by one
to ignore the directory instead of aborting the sync.
However, as there are more requests to continue the sync in case
of error, just ignore most HTTP errors
Issue #7586
2020-12-15 10:59:03 +01:00
Hannah von Reth
43c7e32ee1
[libsync] Export verifyFileUnchanged
...
This fixes Windows builds that are broken since #7562 was merged
2020-12-15 10:59:03 +01:00
Olivier Goffart
66f7b27121
VFS: Do not overwrite existing files by placeholder
...
For issue #7557 and #7556
Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
2020-12-15 10:59:03 +01:00
Olivier Goffart
fc0aeb53b1
Discovery: fix TestSyncVirtualFiles::testExtraFilesLocalDehydrated on windows
...
On windows we do a test to know if we should change the case of the files,
but that conflict with the test that checks if the file was still there
when the filename is actually the same. Which can happen with virtual files
as they have two representation (the one with and without suffix).
2020-12-15 10:59:02 +01:00
Christian Kamm
4c4cbf0d97
Vfs: Lots of tests and corrections for suffix edge cases
...
Avoid or deal with problems that happen when suffixed files exist on the
server or suffix and non-suffixed files exist locally.
See #7350 , #7261 .
2020-12-15 10:59:02 +01:00
Olivier Goffart
88f86a56b1
Discovery: Attempt to fix issue with windows VFS and new files
...
(or moved files)
As seen in the log of #7558 , a conflict may be issued by mistake.
See investigation in https://github.com/owncloud/client/issues/7558#issuecomment-547385362
This hopefully fix #7558
2020-12-15 10:59:02 +01:00
Olivier Goffart
115a53134c
SyncEngine: Save a bit of memory by not keeping a set of all filename
...
This is only used for conflict files, so only save conflict files.
(The _seenFile was used for other things in 2.5, but not anymore)
2020-12-15 10:59:01 +01:00
Olivier Goffart
83d743b66b
When moving is allowed but deleting is not, do not restore moved items
...
Issue #7293
2020-12-15 10:59:01 +01:00
Olivier Goffart
ee611e6004
Restoration items should appear in the sync protocol
...
When an item is downloaded because it is restored, it shall be shown in the
sync protocol.
(It is also going to be shown in the not synchronized for a short while, but
that's fine)
2020-12-15 10:59:01 +01:00
Christian Kamm
9d422284af
Discovery: Distinguish readdir and closedir errors
2020-12-15 10:59:01 +01:00
Olivier Goffart
adbd3d869b
Fix warning about serverJob not being used
...
And fix a FIXME in the same time
2020-12-15 10:59:00 +01:00
Christian Kamm
89216daee6
Propagate dir: Never write the etag on remote mkdir #7481
...
It must always only be written once all children are successfully
propagated.
2020-12-15 10:59:00 +01:00
Christian Kamm
e91e1ca78f
Test: Disable local discovery parallelism in permission test
...
Adding parallelism broke the test because it depended on the order of
discovery.
2020-12-15 10:59:00 +01:00
Christian Kamm
e596b55977
Discovery: Change local job signal signatures
...
To make it more explicit that data a copy of the data is transfered
between threads. (though Qt will make a copy of the arguments anyway)
2020-12-15 10:58:59 +01:00
Christian Kamm
71f71b38f1
Discovery: local job shouldn't be parented
...
Since it'll be deleted by the thread pool.
2020-12-15 10:58:59 +01:00
Christian Kamm
53a217d4e4
Don't store pointer to local job
...
There were crashes in the QPointer assignment. Possibly the thread pool
is done with the job and deletes it before the assignment is done.
2020-12-15 10:58:59 +01:00
Markus Goetz
26b5e36351
Discovery: List local directories from thread #7456 #7439
2020-12-15 10:58:59 +01:00
Markus Goetz
09a0dbbf82
Reconcile: Sort already during discovery #7445
2020-12-15 10:58:59 +01:00
Markus Goetz
41dc68f99c
Propagator: Delay job execution a bit #7439
2020-12-15 10:58:58 +01:00
Christian Kamm
e37e954720
Discovery: Remove level of indent around moves
...
No code changes.
2020-12-15 10:58:58 +01:00
Christian Kamm
28797baa39
Discovery: If a move is forbidden, restore the source
...
Previously the source was deleted (or attempted to be deleted), even if
the new location was not acceptable for upload. This could make data
unavilable on the server.
For #7410
2020-12-15 10:58:58 +01:00
Christian Kamm
c9d1037622
Propagation: Fix delete-before-rename bug #7441
...
By introducing a PropagateRootDirectory job that explicitly
separates the directory deletion jobs from all the other jobs.
Note that this means that if there are errors in subJobs the
dirDeletionJobs won't get executed.
2020-12-15 10:58:58 +01:00
Markus Goetz
475117dd60
Propagator: Make sure we schedule only one job #7439
...
To not starve the event loop.
(There is still ~= 3 jobs running at the same time)
2020-12-15 10:58:58 +01:00
Christian Kamm
3446412d92
PropagateDownload: Don't try to open readonly temporaries
...
This situation could arrise when receiving a read-only share and the
temporary rename failed for some reason.
See #7419
2020-12-15 10:58:58 +01:00
Christian Kamm
0ac8a3e6be
Don't fatal on "Storage temporarily unavailable"
...
This is an unreliable workaround. The real fix will need to be deferred
to another release.
For #5088
2020-12-15 10:58:57 +01:00
Hannah von Reth
e5a36c3bc6
CMake VFS: Enable us to provided vfs plugins from an external directory
2020-12-15 10:58:57 +01:00
Dominik Schmidt
67656fb136
Add Q_PROPERTYs for gui testing
2020-12-15 10:58:56 +01:00
Hannah von Reth
e97784bb9d
Don't use mutable lambdas as they hide where we modify work on a copy
2020-12-15 10:58:55 +01:00
Christian Kamm
18e1098e38
Remove maxLogLines config option
...
It's no longer used.
For owncloud/docs#1365
2020-12-15 10:58:55 +01:00
Christian Kamm
ea829f96ca
Download: Don't trigger too many concurrent hash computations
...
Previously the job would only become "active" when the downloads
started. That meant that arbitrarily many hash computations could be
queued at the same time.
Since the the file was opened during future creation this could lead to
a "too many open files" problem if there were lots of new-new conflicts.
To change this:
- Make PropagateDownload become active when computing a hash
asynchronously.
- Make the computation future open the file only once it gets run. This
will make it less likely for this problem to occur even if thousands
of these futures are queued.
For #7372
2020-12-15 10:58:55 +01:00
Christian Kamm
8a5a185752
Fix 'unused parameter name' warnings
2020-12-15 10:58:55 +01:00
Christian Kamm
5761f4cd8a
SyncEngine: Don't duplicate fatal errors
...
Previously fatal error texts were duplicated: Once they entered the
SyncResult via the SyncFileItem and once via syncError().
syncError is intended for folder-wide sync issues that are not pinned
to particular files. Thus that duplicated path is removed.
For #5088
2020-12-15 10:58:54 +01:00
Christian Kamm
61972c35a8
Discovery: Parse etag to be consistent with RequestEtagJob
...
This avoids unnecessary sync runs.
For #7345
2020-12-15 10:58:54 +01:00
Christian Kamm
55ee3f440b
Vfs: Remove old db record when dehydrating via rename
...
For #7338
2020-12-15 10:58:54 +01:00
Christian Kamm
e6990bd04e
Vfs: Make move detection work with virtual files #7001
...
Previously a checksum computation could be done on a suffix-placeholder
file, making discovery believe that no move took place.
2020-12-15 10:58:54 +01:00
Christian Kamm
00dcf3ef59
Vfs: Ensure pins change with (de-)hydration
...
Previously an implicit hydration of a file in an online-only folder
would not change the pin state and cause a dehydration on the next
sync.
2020-12-15 10:58:53 +01:00
Christian Kamm
0df3b83bd2
Vfs: Add hook to allow update-metadata for unchanged files
...
Allows winvfs to convert files to placeholders when vfs is enabled. This
is required to mark files as in-sync #7329 .
2020-12-15 10:58:53 +01:00