From 83779a9486d380f86654f67c11821be13ed0b21f Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Tue, 6 Jan 2026 09:48:23 +0100 Subject: [PATCH 1/2] Minor fixes - Added Cloudflare to list of known S3 provider domains. - Removed AWS specific naming on the help texts. - Fixed an edge case where calculating how many files to test with an empty list would crash - Fixed a bug with getting a safe display url for very short urls --- Duplicati/Library/Backend/S3/S3Backend.cs | 1 + Duplicati/Library/Backend/S3/Strings.cs | 8 ++++---- Duplicati/Library/Main/Operation/BackupHandler.cs | 1 + Duplicati/Library/Utility/Utility.cs | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Duplicati/Library/Backend/S3/S3Backend.cs b/Duplicati/Library/Backend/S3/S3Backend.cs index dc32d235d..12eeb7f42 100644 --- a/Duplicati/Library/Backend/S3/S3Backend.cs +++ b/Duplicati/Library/Backend/S3/S3Backend.cs @@ -96,6 +96,7 @@ namespace Duplicati.Library.Backend { "Rabata EU West 2 (Netherlands)", "s3.eu-west-2.rabata.io" }, { "Internxt US Central 1 (Texas)", "s3.us-central-1.internxt.com" }, { "Internxt EU Central 1 (Amsterdam)", "s3.eu-central-1.internxt.com" }, + { "Cloudflare R2", ".r2.cloudflarestorage.com" } }; //Updated list: http://docs.amazonwebservices.com/general/latest/gr/rande.html#s3_region diff --git a/Duplicati/Library/Backend/S3/Strings.cs b/Duplicati/Library/Backend/S3/Strings.cs index b5c4321b3..f580073c9 100644 --- a/Duplicati/Library/Backend/S3/Strings.cs +++ b/Duplicati/Library/Backend/S3/Strings.cs @@ -25,10 +25,10 @@ namespace Duplicati.Library.Backend.Strings { public static string Description_v2 { get { return LC.L(@"This backend can read and write data to an S3 compatible server. Allowed format is ""s3://bucketname/prefix""."); } } public static string DisplayName { get { return LC.L(@"S3 compatible"); } } - public static string AMZKeyDescriptionLong { get { return LC.L(@"AWS Secret Access Key can be obtained after logging into your AWS account. This can also be supplied through the option --{0}.", "auth-password"); } } - public static string AMZKeyDescriptionShort { get { return LC.L(@"AWS Secret Access Key"); } } - public static string AMZUserIDDescriptionLong { get { return LC.L(@"AWS Access Key ID can be obtained after logging into your AWS account. This can also be supplied through the option --{0}.", "auth-username"); } } - public static string AMZUserIDDescriptionShort { get { return LC.L(@"AWS Access Key ID"); } } + public static string AMZKeyDescriptionLong { get { return LC.L(@"Secret Access Key can be obtained after logging into your account. This can also be supplied through the option --{0}.", "auth-password"); } } + public static string AMZKeyDescriptionShort { get { return LC.L(@"Secret Access Key"); } } + public static string AMZUserIDDescriptionLong { get { return LC.L(@"Access Key ID can be obtained after logging into your account. This can also be supplied through the option --{0}.", "auth-username"); } } + public static string AMZUserIDDescriptionShort { get { return LC.L(@"Access Key ID"); } } public static string AuthPasswordDescriptionLong { get { return LC.L(@"The password used to connect to the server. This may also be supplied as the environment variable ""AUTH_PASSWORD""."); } } public static string AuthPasswordDescriptionShort { get { return LC.L(@"Supply the password used to connect to the server"); } } public static string AuthUsernameDescriptionLong { get { return LC.L(@"The username used to connect to the server. This may also be supplied as the environment variable ""AUTH_USERNAME""."); } } diff --git a/Duplicati/Library/Main/Operation/BackupHandler.cs b/Duplicati/Library/Main/Operation/BackupHandler.cs index 4801d99e3..51bfb23b6 100644 --- a/Duplicati/Library/Main/Operation/BackupHandler.cs +++ b/Duplicati/Library/Main/Operation/BackupHandler.cs @@ -617,6 +617,7 @@ namespace Duplicati.Library.Main.Operation .Where(x => x.State == RemoteVolumeState.Verified) .GroupBy(x => x.Type) .Select(x => x.LongCount()) + .Append(0L) .MaxAsync() .ConfigureAwait(false); diff --git a/Duplicati/Library/Utility/Utility.cs b/Duplicati/Library/Utility/Utility.cs index 7cf85b57e..6363fd109 100644 --- a/Duplicati/Library/Utility/Utility.cs +++ b/Duplicati/Library/Utility/Utility.cs @@ -1654,7 +1654,7 @@ namespace Duplicati.Library.Utility var sepIndex = Math.Max(0, url.IndexOf('|')) + 1; var length = url.Length - sepIndex; var shown = Math.Min(length, maxShown); - var hidden = length - maxShown; + var hidden = length - shown; var sanitizedUrl = $"{url[sepIndex..(sepIndex + shown)]}{new string('*', hidden)}"; // If we can parse it, this result is better From 7ea545d454bf9fa18a0a50ed70a9194184a2f00c Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Tue, 6 Jan 2026 10:10:48 +0100 Subject: [PATCH 2/2] Added cloudflare to list of safe domain names --- Duplicati/Library/Modules/Builtin/ReportHelper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Duplicati/Library/Modules/Builtin/ReportHelper.cs b/Duplicati/Library/Modules/Builtin/ReportHelper.cs index 8cf3d17ed..ad2251ff8 100644 --- a/Duplicati/Library/Modules/Builtin/ReportHelper.cs +++ b/Duplicati/Library/Modules/Builtin/ReportHelper.cs @@ -673,7 +673,8 @@ namespace Duplicati.Library.Modules.Builtin ".tcloud.com", ".tencentcloudapi.com", ".rabata.io", - ".internxt.com" + ".internxt.com", + ".cloudflarestorage.com" ], StringComparer.OrdinalIgnoreCase); ///