1
0
Fork 0
Commit Graph

172 Commits

Author SHA1 Message Date
Olivier Goffart a1558100b8 WIP: new chunking algorithm
Current limitations of this WiP
 - No resuming implemented yet
 - No parallel chunks
 - Hackish way to get the webdav paths
2016-08-31 10:28:15 +02:00
Daniel Molkentin bb5c2cbfa5 Always follow redirects in network jobs (#4905)
This is a move away from the original policy where jobs
would only follow redirects in special cases.

Two restrictions are in place:

1. We do not allow protocol downgrades (https -> http)
2. We stop redirects after we find them looping (e.g. old = new url, or
indirectly when looping 10 times).

This is closer to RFC conforming behavior, although currently
we will treat 301 replies like they were 302. This is for a separate
commit.

Error handling (and display) also needs improvement.

Addresses #2791
2016-08-09 16:01:29 +02:00
Christian Kamm 4b19cdeca0 Propfind: Treat broken XML response as failure #4575
Soldiering on with a broken or incomplete response could lead to
incorrect sync behavior.

Since discovery uses LsCol jobs which already handle errors
correctly, this should not have a significant impact.
2016-03-17 11:32:19 +01:00
Markus Goetz d78c3679e7 Propagator: Pump in more requests if we think current ones are quick
Helps with small file sync #331
When I benchmarked this, it went up to 6 parallelism and
was about 1/3 faster than the previous fixed 3 parallelism.
Doing more than 6 is dangerous because QNAM limits to 6 TCP
connections and also the server might become a bottleneck.

Should also help for #4081
2016-03-02 15:22:21 +01:00
Hefee 28b694b170 Merge branch '2.1' 2016-02-20 10:34:34 +01:00
Olivier Goffart dd89ab59e4 Use oc:size instead of quota-used-bytes to get the sizes of folder (#4459) 2016-02-11 15:09:47 +01:00
Olivier Goffart 893e22691d ConnectionValidator: Make sure we intercept propfind error
If the PROPFIND return an invalid code (like 200) then we would
not recieve the error signal and we would never sync again.

Found while investigating https://github.com/owncloud/enterprise/issues/1068
2016-02-10 15:38:21 +01:00
Christian Kamm bdf830f691 Add an experimental ProppatchJob #3235 2015-11-23 11:59:56 +01:00
Klaas Freitag 421c6a92f3 NetworkJobs: JSON network job now reports OCS reply code.
The signal jsonReceived() now not only delivers the raw json string, but
also the status code that came as OCS reply.

Also, fixed a typo in the signals name (recieved => received).
2015-11-19 16:01:51 +01:00
Klaas Freitag 87aa1de67a Merge branch 'newactivity' 2015-11-16 17:02:05 +01:00
Klaas Freitag 9545af0d43 JSONApiJob: Add method to add additional query parameter. 2015-11-02 17:37:23 +01:00
Markus Goetz ccec186b98 ETagJob: Depth 0 for server >= 8.1 #3730 2015-10-19 15:31:27 +02:00
Phil Davis f0e17fd9c0 libtypos comment and message typos for master 2015-10-05 09:05:09 +05:45
Markus Goetz 3b59960fb3 Fix Qt4 build (SSL sessionTicket()) 2015-08-11 13:53:21 +02:00
Markus Goetz bd71fdc388 SslButton: Fix harder #3534 #3536 2015-08-11 12:18:25 +02:00
Markus Goetz 9a9cefbcc5 SslButton: Improve reliability and usefulness #3534 #3536 2015-08-05 13:04:30 +02:00
Markus Goetz eafc45d83c CheckServerJob: Only show SSL ticket warning when actually suceeded 2015-07-30 18:16:37 +02:00
Olivier Goffart 61a1a0bb2d PropfindJob: fix a debug output message
Prpfind job can be used for more than getting the quota
2015-06-26 13:32:02 +02:00
Olivier Goffart db87d2a18e QuotaJob: remove and use a PropfindJob instead
This remove code duplication because the QuotaJob was just a duplication
of the propfind jobs with the properties hardcoded.
2015-06-25 14:39:48 +02:00
Olivier Goffart dd5ddf2166 AbstractNetworkJob: move to its own file 2015-06-17 17:29:11 +02:00
Olivier Goffart ce0a0e3f0d Credential: move the implementation to the gui 2015-06-15 17:39:28 +02:00
Olivier Goffart 16786eed54 Merge pull request #3281 from owncloud/confirm
Confirm feature (sync engine part only)
2015-06-10 13:39:52 +02:00
Olivier Goffart e135d4cccf Merge remote-tracking branch 'origin/1.8' 2015-06-10 13:42:02 +02:00
Christian Kamm 2ed329e025 Improve reporting of server error messages. #3220
In particular the 'unsupported client version' error message
is now visible to the user when trying to connect to a
server that no longer supports the current client version.
2015-06-04 10:07:24 +02:00
Christian Kamm 4c10f1e40c Wizard: Show server error message if possible. #3220 2015-06-03 16:33:09 +02:00
Olivier Goffart 5cb10bf6a1 PropfindJob: fix parsing of properties that have a sub element
The default argument of readElementText is ErrorOnUnexpectedElement which
abort the parsing of remaining elements
2015-05-26 12:33:54 +02:00
Olivier Goffart 6b27d2e703 Merge remote-tracking branch 'origin/1.8' 2015-05-26 12:28:31 +02:00
Olivier Goffart 6b9e123816 Merge remote-tracking branch 'origin/checksum_1.8' into 1.8 2015-05-22 10:32:37 +02:00
Philipp Heckel 68fa190cf7 Add 'Content-Length: 0' header 2015-05-20 14:40:20 +01:00
Klaas Freitag 3701fbcbfe PropagateUpload: Add checksum calculation if required by config.
If the config file has an transmissionChecksum entry, a checksum
is added to the PUT requests in a header.
2015-05-19 17:09:39 +02:00
Markus Goetz 2a45ebde33 Networkjobs: Fix Qt 4 compile (again) 2015-05-12 17:19:17 +02:00
Daniel Molkentin a36df4aa4b Merge remote-tracking branch 'origin/1.8' into 1.9 2015-05-12 09:57:22 +02:00
Markus Goetz f2004da867 SSL: Re-use encryption session for different TCP connections #3159
This also improves the SSL configuration creation and fixes #3027
2015-05-08 14:21:27 +02:00
Markus Goetz 0359c775e0 Discovery: Test better, treat invalid hrefs as error #3176 2015-05-07 17:19:48 +02:00
Markus Goetz 2866e56c51 LsColXMLParser: More testing 2 2015-04-14 14:56:25 +02:00
Klaas Freitag 4283ab3b44 LsColJob: Create a XML parser object for better unit testability. 2015-04-14 13:43:05 +02:00
Markus Goetz 9ffacd4ecd Discovery: Explicitly check for XML parser errors
..instead of relying that our state machine does not do anything in that case.
2015-04-13 16:04:24 +02:00
Klaas Freitag ec81cdefb0 Networkjobs: Only log a subset of the account url.
This avoids disclosing of user and password in the logfile which can
happen in some cases.
2015-04-12 12:37:14 +02:00
Olivier Goffart 1617c9d482 PropfindJob: fix xml parsing
It would only find the first property
2015-04-07 10:35:27 +02:00
Jocelyn Turcotte 3c9acdf724 Fix a crash when accessing a dangling UploadDevice pointer #2984
This is largely a guess, but this is the only place where we use
a QIODevice to push data through QNAM and that the QIODevice isn't
a direct child of the QNetworkReply.

Fix the issue by making sure that we don't go back to the event loop
and possibly handle network events between the destruction of the
upload QIODevice and the QNetworkReply, which might lead to QNAM
dereferencing a dangling QIODevice pointer.
2015-03-23 16:14:54 +01:00
Klaas Freitag c88742fad3 Revert "SetupW: Display proper error messages if password or user was wrong."
This reverts commit 396f38598f.

This adds redundant code and potentially breaks Shibboleth
2015-03-10 11:17:35 +01:00
Markus Goetz 31e4009737 Propagator: Use QBA for responseTimestamp instead of QString 2015-03-09 15:52:52 +01:00
Klaas Freitag 396f38598f SetupW: Display proper error messages if password or user was wrong.
If the password or user was wrong during setup, the client showed a
ConnectionClosed error instead of a proper Username or password wrong
message. This was because in HTTPCredentials::slotAuthentication, the
reply is closed, and a property is set to indicate the auth problem.

This patch now checks at all occurences of networkErrors if it might
have been an authentication problem, and displays something useful.

There is a good chance that this is a sufficient fix for
owncloud/enterprise#556
2015-03-06 16:41:59 +01:00
Markus Goetz 3f712dce02 ETags: For Folder and RequestEtagJob, always use Concatenation 2015-03-05 17:49:12 +01:00
Olivier Goffart bd6769a3fd LsColJob: one must now specify the properties
So the discovery phase don't ask for the quota, and the selective sync
don't ask for all the other properties

Issue #2906
2015-03-02 11:03:25 +01:00
Christian Kamm c8167b77c9 Remove mention of allprop #2865 2015-02-26 12:36:11 +01:00
Olivier Goffart 438c4fe72e Account: put the server version in the account 2015-02-12 14:50:42 +01:00
Olivier Goffart 51337a10af LSCOL job: Fix getting the list of folders when there are non-ascii
Task #2795
2015-02-08 12:23:47 +01:00
Olivier Goffart 34237f604e JsonApiJob: Refactor out of the shibbolethuserjob 2015-02-05 15:42:01 +01:00
Olivier Goffart d70e146c1f Merge remote-tracking branch 'origin/ssl_client_cert'
Conflicts:
	CMakeLists.txt
	csync/src/CMakeLists.txt
	csync/src/csync_owncloud.c
2015-01-28 14:13:40 +01:00
Markus Goetz 3885d5d706 Discovery: Report root etag from engine to folder
For #2352
2015-01-23 15:30:44 +01:00
Markus Goetz 0502f684e9 Discovery: Even less qDebug 2015-01-22 14:45:08 +01:00
Markus Goetz 45cb679ea7 Discovery: Less verbose debug 2015-01-22 14:37:35 +01:00
Nourredine ba8b1bbe06 adds 'SSL client certificate' support from n.octeau with qknight changes as:
* removed broken QSsl::SslV3 default
* rewrote slotHandleErrors(): no longer claim errors which are none.
* hack reverted: lib64 was not the cause for NixOS issues related to libraries.
* refactored csync/src/csync_owncloud.c and discovered+fixed why the dav_connect was never getting the certPath+certPassoword
* cleanup of code but seems this crushed the ssl client certificate support
* fixes the https://github.com/owncloud/client/issues/69#issuecomment-69358377 issue
* lots of cleanup
* From TODO list : translate all french comments into english
* changed _pemCertificate type from QString to QByteArray
2015-01-21 23:55:11 +00:00
Olivier Goffart d8b621d05f LsColJob: fix getting the sizes when the path contains %-encoded chars 2015-01-21 12:04:54 +01:00
Markus Goetz 906779c4b1 SyncEngine: Use QNAM for csync_update
This is for #2507
2015-01-20 18:27:25 +01:00
Olivier Goffart 885aafcea3 SelectiveSync dialog: Show the sizes of the folder 2015-01-14 15:08:09 +01:00
Christian Kamm 38ebfec1fb Use global Account/AccountState less.
* Use a shared pointer to Account everywhere to ensure
  the instance stays alive long enough for a sync to terminate
* Folder is now tied to an AccountState
* SyncEngine and OwncloudPropagator tie to an Account and use that
  for all jobs they run

Issue: Since the setup wizard currently always replaces the
account, it will always wipe all folder definitions, even when
the actual changes to the account were minor.
2014-12-18 15:39:51 +01:00
Christian Kamm a006c6962c Move account state related logic into Account.
The account state is now managed mostly by the Account itself
instead of through Application. The gui can still control whether
an account is signed out or not.
2014-12-17 12:01:10 +01:00
Olivier Goffart 3ee14164db network jobs: Refactor the redirect handling in AbdtractNetworkJob
Move the redirect handling from CheckServerJob to AbstractNetworkJob, so we can
later use it in any job  (in preparation for task #2614)
2014-12-16 11:27:02 +01:00
Christian Kamm 53d5de685c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/gui/folder.cpp
	src/gui/folder.h
	src/libsync/networkjobs.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagatedownload.cpp
2014-12-10 13:01:36 +01:00
Daniel Molkentin 3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart f3797abecf Fix the PropfindJob
-the namespace mangling was wrong
-And the way we read the reply did not work
2014-11-14 15:03:48 +01:00
Olivier Goffart 1310bef528 Port the propagate mkdir to QNAM
This way we can make it parallel
2014-11-13 18:57:07 +01:00
Daniel Molkentin 281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Olivier Goffart 134650eb44 Parallel DELETE 2014-11-11 13:19:29 +01:00
Daniel Molkentin ae85aa33fd Adjust namespaces 2014-11-09 22:34:07 +01:00
Daniel Molkentin f25d175b5d Merge remote-tracking branch 'origin/1.7' 2014-11-06 19:54:20 +01:00
Christian Kamm 7ae0338f5c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/socketapi.h
	src/libsync/syncengine.h
	test/CMakeLists.txt
2014-10-22 10:41:55 +02:00
Olivier Goffart 50e718b1e7 Merge branch '1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/folder.cpp
	src/gui/socketapi.cpp
	translations/mirall_ca.ts
	translations/mirall_cs.ts
	translations/mirall_de.ts
	translations/mirall_el.ts
	translations/mirall_en.ts
	translations/mirall_es.ts
	translations/mirall_es_AR.ts
	translations/mirall_et.ts
	translations/mirall_eu.ts
	translations/mirall_fa.ts
	translations/mirall_fi.ts
	translations/mirall_fr.ts
	translations/mirall_gl.ts
	translations/mirall_hu.ts
	translations/mirall_it.ts
	translations/mirall_ja.ts
	translations/mirall_nl.ts
	translations/mirall_pl.ts
	translations/mirall_pt.ts
	translations/mirall_pt_BR.ts
	translations/mirall_ru.ts
	translations/mirall_sk.ts
	translations/mirall_sl.ts
	translations/mirall_sv.ts
	translations/mirall_th.ts
	translations/mirall_tr.ts
	translations/mirall_uk.ts
	translations/mirall_zh_CN.ts
	translations/mirall_zh_TW.ts
2014-09-18 17:10:21 +02:00
Daniel Molkentin 4fc044d368 Merge branch 'master' into move_lib_to_sep_dir
Conflicts:
	cmake/modules/NSIS.template.in
	src/CMakeLists.txt
	src/creds/shibboleth/authenticationdialog.cpp
	src/creds/shibboleth/authenticationdialog.h
	src/gui/owncloudgui.cpp
	src/libsync/creds/shibboleth/authenticationdialog.cpp
	src/libsync/creds/shibboleth/authenticationdialog.h
	src/libsync/mirallaccessmanager.cpp
	src/mirall/authenticationdialog.cpp
	src/mirall/authenticationdialog.h
2014-08-12 21:08:44 +02:00
Daniel Molkentin df3c3bca02 Split into three separate projects: library, gui and cmd 2014-07-11 11:07:31 +02:00