Commit Graph
559 Commits
Author SHA1 Message Date
Kenneth Hsu bbe65f9dfb Remove ineffective statements.
The removed code was introduced in revision ba58651e5a ("Fix for
CreateFolder with SSH"), presumably to fix an issue where some SSH
backends did not like the trailing slash when creating new folders.
However, since we are not using the output argument of the call to
Substring, these statements have no effect.
2018-05-26 10:36:50 -07:00
Kenneth SkovhedeandGitHub 19851c88f0 Merge pull request #3227 from warwickmm/use_string_builder
Replace string concatenation with StringBuilder
2018-05-23 11:10:36 +02:00
Kenneth Hsu 0b016cea2c Replace string concatenation with StringBuilder.
When appending to a string in a loop, using a StringBuilder should in
general yield better performance.
2018-05-19 15:36:00 -07:00
verhoek 2f41e02ca9 Merge branch 'master' into refactored 2018-05-18 08:05:19 +02:00
Kenneth SkovhedeandGitHub b7b4fbe778 Merge pull request #3221 from verhoek/webapi/googledrive
Webapi/googledrive
2018-05-17 14:44:50 +02:00
Tom Whitwell 54ae844536 Add Memset's Cloud Storage to Openstack providers 2018-05-17 12:03:30 +01:00
verhoek 0b9712ee84 Removed unused var. 2018-05-16 21:21:35 +02:00
verhoek c5783b2ae4 Merge branch 'master' into webapi/googledrive 2018-05-15 20:31:58 +02:00
verhoek 0cca2797df Use concat paths in helper functions of googledrive. 2018-05-15 20:29:08 +02:00
verhoek 1cde60c640 Removed misplaced leftover line. 2018-05-15 20:28:52 +02:00
Kenneth Skovhede 2c44cce136 Merge branch 'feature/remove-console-writeline' 2018-05-15 12:12:07 +02:00
Kenneth Skovhede ee64517f7d Removed calls to Console.WriteLine as we may run somewhere without a console. 2018-05-15 11:29:08 +02:00
verhoek 6dd64a553d Fixed code quality issues. 2018-05-14 21:01:18 +02:00
Kenneth Hsu 0777d9c98a Fix indentation to improve readability.
The previous indentation could give the impression that it belongs to
the preceding if-statement.
2018-05-13 14:24:13 -07:00
verhoek dae12fee53 Organized imports. 2018-05-13 16:27:14 +02:00
verhoek a67248f51f Moved Api strings to separate class similarly to the constant setup in Strings.cs. 2018-05-13 16:22:41 +02:00
verhoek 051b030836 Fixed typo regarding pageToken. Integrated other strings in static string class. 2018-05-12 12:42:51 +02:00
verhoek 44b5b00276 Renamed some googledriveapi var names. Modified ListFolder to be more readable. 2018-05-11 19:57:09 +02:00
verhoek 78a46c3a5c Renamed misspelled class urluttility to urlutility and newly added urlutility to uriutility. 2018-05-11 19:09:14 +02:00
verhoek d303db30d6 Replacing magic strings in google drive rest calls by query key value pairs. 2018-05-11 18:23:16 +02:00
verhoek 55e349f410 Renamed variable to indicate meaning properly. 2018-05-09 18:57:04 +02:00
verhoek ddba3459bf Removed extra local var. 2018-04-30 20:50:49 +02:00
Kenneth SkovhedeandGitHub 3b55cfb570 Merge pull request #3170 from epol/master
Solved some codacy warnings on OpenStackStorage
2018-04-12 09:47:43 +02:00
Enrico Polesel 904616aff5 Solved some codacy warnings on Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs 2018-04-11 11:44:05 +02:00
Tyler Gill e7e1ccdec2 Fix auth-id hiding in MS Graph backends. 2018-04-10 10:10:19 -06:00
Kenneth SkovhedeandGitHub 91efdcc4f7 Merge pull request #3154 from epol/master
Openstack keystone v3 support
2018-04-08 13:15:22 +02:00
Enrico Polesel e257cf569a Improved code quality for the PR 2018-04-06 10:13:15 +02:00
Bruceforce c3f94ec6cb rclone backend should honor advanced options (see #3142) 2018-04-05 17:43:19 +02:00
Enrico Polesel 6a8776f7f5 Openstack keystone v3 support
Added support for the new keystone v3 API, the old v2.0 APIs are still
available, the v3 can be selected with a version option.

Only password login is implemented here for API v3, so token login is
still missing.
2018-04-05 15:14:22 +02:00
Kenneth Hsu c0c29e579d Make string comparison use ordinal (binary) sort rules.
This string comparison should not be culture-aware.
2018-03-28 20:49:47 -07:00
Tyler Gill f93f9dcc5a Add new utility class, OAuthHttpClient.
This class extends HttpClient and uses an OAuthHttpMessageHandler under the covers to automatically authenticate requests.
Additionally, it automatically respects the global HttpContextSettings for overall timeout, read/write timeout, and SSL certificate validation.
(BufferRequests isn't currently handled, as HttpClient doesn't seem to easily expose that flag, and as of .NET 4.5, seems to not buffer by default.)
2018-03-23 15:07:51 -06:00
Tyler Gill 407bead9f9 Change some fragment settings.
Default retry delay is now 1000ms, and fragment sizes must be at least the multiple size (320 KiB)
2018-03-23 15:04:23 -06:00
Tyler Gill 5a4d170165 Update strings for Microsoft Group backend. 2018-03-23 15:03:04 -06:00
Tyler Gill 448577f5ff Handle cases where the SharePoint path is given with an 'https' prefix in the UI. 2018-03-22 16:15:09 -06:00
Tyler Gill 7491da2add Add entry for --group-email so it isn't treated as an unknown property. 2018-03-22 16:14:42 -06:00
Tyler Gill 5bec41b665 Update both SharePoint and Office 365 group backends to support more human-discernable methods of specifying the backend destination.
For SharePoint, this means instead of giving the site ID as a parameter (and a relative path as the backup URL), the full URL to the folder in SharePoint (e.g., 'sharepoint://{tenant}.sharepoint.com/{PathToSite}/{DocumentBase}/{subfolder}') can be given, and the site ID will be looked up.
(This should match the existing SharePoint backend, including the convention of using '//' to indicate the document root, though I can't explicitly test that since the SharePoint sites I have access to require 2FA, which the old backend doesn't support.)
I've tested both explicit ID and site path methods of specifying the destination, and they appear to be working.
For Office 365 groups, it now supports looking up a group by its email address.
2018-03-22 15:20:17 -06:00
Tyler Gill 987cda7e1d When uploading large files, MS graph backends need to parse the response inside the try block for retries to work (since that is where errors are thrown) 2018-03-22 14:41:19 -06:00
Tyler Gill 258799266e SharePoint and Group drives appear to report quota info that is all zeros.
In that case, pretend that no quota info was reported instead of causing incorrect quota warnings and errors.
2018-03-22 14:40:37 -06:00
Tyler Gill 438c84f824 Ensure custom fragment sizes fit the recommended sizes (under 60 MiB and multiple of 320 KiB) 2018-03-21 11:32:41 -06:00
Tyler Gill 97a93a071f Make m_oauth readonly in OAuthHttpMessageHandler. 2018-03-21 11:23:50 -06:00
Tyler Gill 55c182b946 Strip authorization header and access token out of Microsoft Graph exception messages. 2018-03-21 11:16:27 -06:00
Tyler Gill 6c05da925e Explicitly request the 'replace' conflict resolution behavior when uploading large files. 2018-03-20 15:28:57 -06:00
Tyler Gill dbb28c5f62 Make sure DNS names reported by Microsoft Graph backends are unique. 2018-03-20 15:26:52 -06:00
Tyler Gill c57d7e75cd Add helpId parameter to UserInformationExceptions in MicrosoftGraphBackends. 2018-03-20 15:09:06 -06:00
Tyler Gill 94341a640d Implement DNSName method in MicrosoftGraphBackend base class. 2018-03-20 15:08:30 -06:00
Tyler Gill f4c6100873 Add Duplicati + version as the user agent in the MS Graph backends. 2018-03-20 15:07:46 -06:00
Tyler Gill 4578a5bd91 Merge branch 'master' of https://github.com/duplicati/duplicati into feature/ms-graph-backends 2018-03-20 14:24:48 -06:00
Tyler Gill a98c967f70 Add new backends for OneDrive+OneDrive for Business, SharePoint, and Microsoft Groups based on the Microsoft Graph API.
These backends are implemented via the common base class, MicrosoftGraphBackend, with only a few minor tweaks (different id parameters, protocol keys, descriptions, etc.)
All three backends support streaming, quota retrieval, and rename.
2018-03-20 14:18:49 -06:00
Tyler Gill c542d65997 Update service agreement and privacy policy link for OneDrive backend. 2018-03-20 14:01:28 -06:00
Tyler Gill 20fc793dee Add OAuthHttpMessageHandler helper class to OAuthHelper library.
This class implements the abstract HttpMessageHandler class (mostly via the default HttpClientHandler implementation).
This abstract class is used by System.Net.Http.HttpClient as the underlying HTTP mechanism, and in this particular case is used to automatically add an authorization header to each request.
It also provides a method for marking a request as one that should not be authenticated.
2018-03-20 14:00:52 -06:00