Commit Graph

578 Commits

Author SHA1 Message Date
Hannah von Reth
c8d1e081c1 Tests: Add test for behaviour on unexpected user in authentication reply 2020-01-24 14:00:43 +01:00
Hannah von Reth
168e062d7c [Oauth] move oauth refresh to oauth.cpp 2020-01-24 14:00:43 +01:00
Hannah von Reth
e113f8069e Oauth: Cleanup 2020-01-24 14:00:43 +01:00
Hannah von Reth
d0943439b7 Move oauth from ui -> libsync 2020-01-24 14:00:43 +01:00
Hannah von Reth
69f74a6398 [CMAKE] Cleanup cmocka tests 2020-01-20 12:19:57 +01:00
Hannah von Reth
4a1e8202a0 [CMAKE] Use ecm for autotests 2020-01-20 12:19:57 +01:00
Hannah von Reth
41649c6d7a [CMAKE] Set C standard for C unittests 2020-01-09 15:39:32 +01:00
Hannah von Reth
6725cd5826 [CMAKE] Resolve some issues discovered during review 2020-01-09 15:39:32 +01:00
Hannah von Reth
9a11f4e9f1 [CMAKE] Use KDECmakeSettings 2020-01-09 15:39:32 +01:00
Hannah von Reth
a6fba2d200 [CMAKE] Start using extra cmake modules 2020-01-09 15:39:32 +01:00
Hannah von Reth
a94804c75d [OAuth] Add state parameter to negotiation 2019-12-16 19:55:40 +01:00
Hannah von Reth
ac1102070f Merge branch '2.6' 2019-12-06 16:52:12 +01:00
Olivier Goffart
112e78ba94 Support for openid connect 2019-11-20 14:32:57 +01:00
Olivier Goffart
ba99c38d19 Don't show the "All files deleted" popup when unselecting everything with selective sync
Issue #7337
2019-11-18 11:28:47 +01:00
Olivier Goffart
50179c3b54 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	.drone.yml
        VERSION.cmake
2019-11-11 11:44:31 +01:00
Olivier Goffart
48d3c8432e 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
2019-11-03 17:01:48 +01:00
Olivier Goffart
6b361f2cc2 Merge remote-tracking branch 'origin/2.6' 2019-10-31 17:05:42 +01:00
Olivier Goffart
60d28c44be Test: Fix testsyncvirtualfiles test
Like previous commit, the failure was caused by two conflicting commits
2019-10-30 18:26:16 +01:00
Olivier Goffart
79e9168beb Fix build of tests.
Resulted from a conflict between two patches
2019-10-30 17:51:28 +01:00
Christian Kamm
16a8823e11 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.
2019-10-30 14:41:01 +01:00
Olivier Goffart
292e983d7c Merge remote-tracking branch 'origin/2.6' into master 2019-10-14 14:12:03 +02:00
Olivier Goffart
fb84e4c990 When moving is allowed but deleting is not, do not restore moved items
Issue #7293
2019-10-11 13:09:07 +02:00
Olivier Goffart
06e3a98e8d Fix Upload of large (> 2GiB) files
Issue #7506

This is a regression introduced by the delta sync feature (as the chunk offset
changed from being the chunk number to be the byte offset, it needs to be a
qint64 now)
2019-10-09 13:55:06 +02:00
Olivier Goffart
4eeb6483b5 Merge remote-tracking branch 'origin/2.6' 2019-10-08 11:11:05 +02:00
Christian Kamm
ed7ec006f0 Tests: Fail if the initial sync fails 2019-10-08 09:37:29 +02:00
Olivier Goffart
1597b2edc1 Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2019-10-07 22:36:55 +02:00
Christian Kamm
5f3682a47d Propagate dir: Never write the etag on remote mkdir #7481
It must always only be written once all children are successfully
propagated.
2019-10-07 14:33:15 +02:00
Hannah von Reth
2fcc92dfee Avoid Windows crt warning by an alternative implementation 2019-10-07 14:03:06 +02:00
Christian Kamm
976db2ef84 Test: Disable local discovery parallelism in permission test
Adding parallelism broke the test because it depended on the order of
discovery.
2019-09-16 19:52:19 +02:00
Markus Goetz
e1b31d742c Discovery: List local directories from thread #7456 #7439 2019-09-09 20:41:55 +02:00
Christian Kamm
99fd45051a 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
2019-09-02 09:58:59 +02:00
Christian Kamm
1e652e12b5 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.
2019-08-30 18:33:23 +02:00
Christian Kamm
0f606229f2 Checksums: Fix crash due to threading issue
The checksum computation thread was potentially using a QFile that was
deleted in the gui thread.

For #7368
2019-08-07 21:22:48 +02:00
Christian Kamm
4fd9bdc4b4 Vfs: Remove old db record when dehydrating via rename
For #7338
2019-07-25 15:21:54 +02:00
Christian Kamm
d09c4fd2e8 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.
2019-07-24 16:16:39 +02:00
Christian Kamm
199163187a Vfs: Preserve pin state on hydration
For #7322 and #7323
2019-07-18 20:00:28 +02:00
Christian Kamm
aafa903a02 Drone: Skip DatabaseErrorTest
It seems reliable when run manually, but frequently breaks when executed
by drone.
2019-07-15 11:37:59 +02:00
Christian Kamm
75ddb8dd80 Vfs: Make test pass with different suffix #7279 2019-06-28 10:48:18 +02:00
Christian Kamm
6b89747a26 VfsSuffix: Wipe stale pin states #7273
Previously the pin states of deleted files stayed in the 'flags'
database and could be inadvertently reused when a new file with the same
name appeared. Now they are deleted.

To make this work right, the meaning of the 'path' column in the 'flags'
table was changed: Previously it never had the .owncloud file suffix.
Now it's the same as in metadata.path.

This takes the safe parts from #7274 for inclusion in 2.6. The more
elaborate database schema changes (why use 'path' the join the two
tables in the first place?) shall go into master.
2019-06-27 15:57:20 +02:00
Christian Kamm
86b15ffb20 RequestEtagJob: Consistently parse etags #7271
Previously RequestEtagJob did return the etag verbatim (including extra
quotes) while the db had the parsed form. That caused the etag
comparison during discovery move detection to always fail. The test
didn't catch it because the etags there didn't have quotes.

Now:
- RequestEtagJob will parse the etag, leading to a consistent format
- Tests have etags with quotes, detecting the problem
2019-06-27 13:08:18 +02:00
Christian Kamm
02a9b16b0f Vfs: Move pin state if files move #7250
Previously renames of items didn't carry the pin state with them.
2019-06-23 10:23:37 +02:00
Christian Kamm
e653924e06 Vfs: Don't let new local files start out unpinned #7250
If one adds a new file to an online-only folder the previous behavior
was to upload the file in one sync and dehydrate it in the next. Now
these new files get set to Unspecified pin state, making them retain
their data.
2019-06-23 10:23:37 +02:00
Christian Kamm
86d36f0a78 Merge remote-tracking branch 'origin/2.5' into 2.6 2019-06-12 13:23:41 +02:00
Christian Kamm
98ba64e60c Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.

The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.

(cherry picked from commit 677e44dc53)

Cherry-picked to allow 2.5 users with new enough Qt to test the HTTP2
workaround.
2019-06-12 13:16:32 +02:00
Christian Kamm
677e44dc53 Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.

The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.
2019-06-07 19:26:19 +02:00
Christian Kamm
962fafaf9e Tests: Fix DB locking issue in permissions test
(cherry picked from commit 3fb4a540da)
2019-06-07 09:30:52 +02:00
Olivier Goffart
cb26f516f7 Discovery: Do not abort the sync in case of error 404 (or 500)
Issue: #7199
2019-06-05 11:09:16 +02:00
Olivier Goffart
819175ad89 SyncEngine: Fix renaming a single file cause the "delete all file" popup
Possibly a regression, since the new discovery discovers rist the renamed
files as removed

Issue #7204
2019-06-04 15:56:35 +02:00
Markus Goetz
dc2a37e813 OAuth2: Better error logging
This does not fix a bug, just was found while spotting a bug that was no bug.
For https://github.com/owncloud/enterprise/issues/2951
2019-05-15 09:58:59 +02:00
Christian Kamm
87cd1c38be Merge remote-tracking branch 'origin/2.5' into 2.6 2019-05-13 07:51:54 +02:00