Commit Graph
1552 Commits
Author SHA1 Message Date
Kenneth Skovhede 4fe678b5e1 Improve OAuth error handling
This PR updates OAuth handling to not retry if the request has been cancelled, as no further attempts will work, but the wait delay would still be applied.

Now the cancellation triggers immediately, even if we are in the wait stage.

If the server returns an error message, that message is now propagated to the client so the user can see what the problem might be.
2025-07-07 15:40:32 +02:00
Kenneth Skovhede fa19725a9a Fixed creating folder with Google Drive
This fixes #6389
2025-07-07 11:46:20 +02:00
Carl Johnsen e71adc8ad9 Added specific package versions to the Storj backend, as the default would pull in old sqlite packages that could conflict with the newer sqlite packages pulled in by Microsoft.Data.Sqlite 2025-06-23 13:28:37 +02:00
Kenneth Skovhede bf9c0e1a95 Added Mega S4 endpoints to list of destinations 2025-06-17 09:14:06 +02:00
Kenneth Skovhede 930764a323 Update WebDAV backend
This re-introduces the debug-propfind feature to dump the PROPFIND response to a file.

It also introduces constants for the option names to be less error prone.

A few minor adjustements were made to the timeouts and the dispose flag.
2025-06-13 11:33:46 +02:00
Kenneth SkovhedeandGitHub d432006207 Merge branch 'master' into feature/http-client-timeout-revision 2025-06-12 22:27:12 +02:00
Marcelo C. 477f70508e Applying suggested changes 2025-06-12 11:29:44 -03:00
Marcelo C. 614f047dbb Sets infinite timeout for HTTP clients
Ensures that long-running HTTP requests, such as downloads and uploads, do not timeout prematurely.

This change configures specific HttpClient instances with an infinite timeout to accommodate operations that may take an extended period. The default 100s timeout is retained for some operations like registration, where a long delay may indicate a problem.
2025-06-12 10:33:13 -03:00
Kenneth Skovhede 35058d333e Update handling of alternate OAuth url
This PR removes the `OAuthContextSettings` class, and makes the `--oauth-url` option available on each backend that uses it, so it can be configured as part of the destination.

To assemble everything related to configuring OAuth, the code was moved to the `AuthIdOptionsHelper`, such that the usage can be shared between implementations.

This PR also adds the option to set the default OAuth url from the environment variable `DUPLICATI_OAUTH_SERVICE`.

The server can then be set in the following locations (most important last):
- Environment variable
- Server-wide advanced settings
- Backup job advanced settings (or commandline)
- Destination url
2025-06-11 09:27:40 +02:00
Kenneth Skovhede fa6343fb71 Added exception guards for testing for key availability. 2025-06-03 10:17:49 +02:00
Kenneth Skovhede f2b7ed3bfd Bumped SSH.Net to 2025.0.0 2025-06-03 09:48:10 +02:00
Kenneth Skovhede 4337d0d478 Fixed wrong package.
Fixed wrong loading of keys.
Added support for MacOS KeyChain keys.
2025-06-03 09:47:39 +02:00
Kenneth Skovhede 1420bed3c5 Rename option to disable ssh agent 2025-06-03 06:23:45 +02:00
Kenneth SkovhedeandGitHub e99bcd84f3 Merge pull request #6291 from duplicati/feature/remote-oauth-helper
Remove OAuthHelper
2025-05-26 08:28:44 +02:00
Kenneth Skovhede bc48135782 Fixed code to be compatible with System.Text.Json instead of NewtonSoft.Json 2025-05-24 15:50:37 +02:00
Kenneth Skovhede 0eef7ec49b Final removal of AsyncHttpRequest. 2025-05-24 13:55:19 +02:00
Kenneth Skovhede 9723b78279 Fixed nullability issues 2025-05-24 13:54:59 +02:00
Kenneth SkovhedeandGitHub 08f4ef897f Merge pull request #6292 from marceloduplicati/feature/openstack-httpmigration
Refactors OpenStack backend to use HttpClient
2025-05-24 13:46:13 +02:00
Kenneth Skovhede f3d24bafe7 SSH key supports direct content
Added support for providing the SSH key via a non-encoded key parameter, as the connection string is already url encoded.
2025-05-24 11:01:49 +02:00
Kenneth Skovhede 06c5b14eda Minor cleanup to use the HttpClient API 2025-05-24 10:51:00 +02:00
Marcelo C. 262aca847d Exception Handling migrated from WebException 2025-05-23 12:09:11 -03:00
Marcelo C. 132508545c Openstack HttpClient migration 2025-05-23 10:37:42 -03:00
Kenneth Skovhede 70f092cf49 Reverted some uses of TryAddWithoutValidation 2025-05-23 14:52:07 +02:00
Kenneth Skovhede 6e8cb85f46 Fixed bug with API introduced during migration 2025-05-23 14:27:40 +02:00
Kenneth Skovhede 1e8eb0b6f8 Common check for missing folder 2025-05-23 14:27:07 +02:00
Kenneth Skovhede 9ead8e04b6 Fixed GCS and GoogleDrive 2025-05-23 14:12:36 +02:00
Kenneth Skovhede 2d4eccaa33 Removed use of TryAddWithoutValidation as it can hide cases where the headers are not set. 2025-05-23 14:11:47 +02:00
Kenneth Skovhede 14741a3b43 Removed some checks for WebException that is no longer used.
Changed throwing WebException to throwing HttpRequestException
2025-05-23 14:02:03 +02:00
Kenneth Skovhede 6a9ed19e1a Updated Dropbox to use the helper method for translating exceptions 2025-05-23 14:01:03 +02:00
Kenneth Skovhede c44bac7474 Removed checks for status code as that is done in the helper 2025-05-23 14:00:39 +02:00
Kenneth Skovhede 5f50c8e77c Updated JottaCloud to not use OAuthHelper 2025-05-23 12:01:28 +02:00
Kenneth Skovhede ff11c0701a Merge remote-tracking branch 'origin/master' into feature/remote-oauth-helper 2025-05-23 11:59:03 +02:00
Kenneth Skovhede 212d40346a Migrated Dropbox as well 2025-05-23 11:28:53 +02:00
Kenneth Skovhede 24c105686a Removed duplicate definition 2025-05-23 10:47:10 +02:00
Kenneth SkovhedeandGitHub 4c0e4320a5 Merge branch 'master' into feature/http-migration-jottacloud 2025-05-23 10:45:11 +02:00
Kenneth Skovhede d3b65f1e92 Remove OAuthHelper
This PR removes OAuthHelper.

Initial commit is removal of OAuthHelper in GoogleCommon, GoogleDrive and GCS.
2025-05-23 10:40:55 +02:00
Kenneth Skovhede b13b88bb1e Switched initialization to a method to avoid await in the constructor, and avoid needing a call to the initialization method 2025-05-23 08:39:20 +02:00
Kenneth Skovhede 91f1cf2776 Merge remote-tracking branch 'origin/master' into feature/remove-sia 2025-05-23 08:13:23 +02:00
Marcelo C. 4dd0920d27 Using on request and response 2025-05-22 12:30:09 -03:00
Marcelo C. 77c89d55b2 JottaCloud HttpClient migration 2025-05-22 12:15:10 -03:00
Kenneth Skovhede d34b20d38a Remove Sia backend
The Sia backend implementation is based on the previous version of Sia and will no longer work after the hard fork later this year.
2025-05-22 15:28:59 +02:00
Kenneth Skovhede f7f86a8224 Re-added string that should not be removed 2025-05-21 17:25:55 +02:00
Kenneth Skovhede 6031b4de8b Update Test method to check for write permissions
This PR moves the check from the FTP backend into shared code, so all backends will now check for read/write permissions when using the "Test" button.

For situations where write permissions are not required (like restore or verify) there is a flag on the v2 API that indicates if the connection was established, so the UI can show a message suggesting that it is possible to proceed, if the current UI operation does not require write permissions.

This fixes #2473
2025-05-21 17:19:27 +02:00
Kenneth Skovhede 06ebcf85e4 Fixed incorrect buffersize parsing in CIFS backend 2025-05-20 15:24:15 +02:00
Kenneth SkovhedeandGitHub 292107b9de Merge pull request #6262 from duplicati/feature/fix-dbtool-tests-should-fail
Check exit code in dbtool tests
2025-05-16 19:01:47 +02:00
Kenneth Skovhede 97ef8137ed Fixed some compile issues on Windows 2025-05-16 15:51:49 +02:00
Carl Johnsen f73a1bcfcd Forward slash to backslash 2025-05-16 10:25:27 +02:00
Carl Johnsen 388e849324 Converted tabs to spaces 2025-05-16 10:25:08 +02:00
Carl Johnsen 8be97bcefd Whitespace changes 2025-05-16 10:22:51 +02:00
Carl Johnsen 58db4c9753 Restructured ItemGroups 2025-05-16 10:15:31 +02:00