Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Duplicati/Library/Backend/Tardigrade/Strings.cs3
-rw-r--r--Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js11
-rw-r--r--Duplicati/Server/webroot/ngax/templates/backends/tardigrade.html4
3 files changed, 17 insertions, 1 deletions
diff --git a/Duplicati/Library/Backend/Tardigrade/Strings.cs b/Duplicati/Library/Backend/Tardigrade/Strings.cs
index 9fb19e085..2484797dc 100644
--- a/Duplicati/Library/Backend/Tardigrade/Strings.cs
+++ b/Duplicati/Library/Backend/Tardigrade/Strings.cs
@@ -20,11 +20,14 @@ namespace Duplicati.Library.Backend.Strings
public static string TardigradeAPIKeyDescriptionLong { get { return LC.L(@"The API key grants access to a specific project on your chosen satellite. Head over to the dashboard of your satellite to create one if you do not already have an API key."); } }
public static string TardigradeSecretDescriptionShort { get { return LC.L(@"The encryption passphrase"); } }
public static string TardigradeSecretDescriptionLong { get { return LC.L(@"The encryption passphrase is used to encrypt your data before sending it to the Storj network. This passphrase can be the only secret to provide - for Storj you do not necessary need any additional encryption (from Duplicati) in place."); } }
+ public static string TardigradeSecretVerifyDescriptionShort { get { return LC.L(@"The encryption passphrase (for verification)"); } }
+ public static string TardigradeSecretVerifyDescriptionLong { get { return LC.L(@"The encryption passphrase verification to make sure you provided the expected value."); } }
public static string TardigradeSharedAccessDescriptionShort { get { return LC.L(@"The access grant"); } }
public static string TardigradeSharedAccessDescriptionLong { get { return LC.L(@"An access grant contains all information in one encrypted string. You may use it instead of a satellite, API key and secret."); } }
public static string TardigradeBucketDescriptionShort { get { return LC.L(@"The bucket"); } }
public static string TardigradeBucketDescriptionLong { get { return LC.L(@"The bucket where the backup will reside in."); } }
public static string TardigradeFolderDescriptionShort { get { return LC.L(@"The folder"); } }
public static string TardigradeFolderDescriptionLong { get { return LC.L(@"The folder within the bucket where the backup will reside in."); } }
+ public static string TardigradeEncryptionPassphrasesDoNotMatchError { get { return LC.L(@"The encryption passphrases do not match"); } }
}
}
diff --git a/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js b/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js
index b8e3efa9a..c90e512e4 100644
--- a/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js
+++ b/Duplicati/Server/webroot/ngax/scripts/services/EditUriBuiltins.js
@@ -495,6 +495,8 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
scope.tardigrade_api_key = options['--tardigrade-api-key'];
if (options['--tardigrade-secret'])
scope.tardigrade_secret = options['--tardigrade-secret'];
+ if (options['--tardigrade-secret-verify'])
+ scope.tardigrade_secret_verify = options['--tardigrade-secret-verify'];
if (options['--tardigrade-shared-access'])
scope.tardigrade_shared_access = options['--tardigrade-shared-access'];
if (options['--tardigrade-bucket'])
@@ -502,7 +504,7 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
if (options['--tardigrade-folder'])
scope.tardigrade_folder = options['--tardigrade-folder'];
- var nukeopts = ['--tardigrade-auth-method','--tardigrade-satellite', '--tardigrade-api-key', '--tardigrade-secret', '--tardigrade-shared-access', '--tardigrade-bucket', '--tardigrade-folder'];
+ var nukeopts = ['--tardigrade-auth-method','--tardigrade-satellite', '--tardigrade-api-key', '--tardigrade-secret', '--tardigrade-secret-verify', '--tardigrade-shared-access', '--tardigrade-bucket', '--tardigrade-folder'];
for (var x in nukeopts)
delete options[nukeopts[x]];
};
@@ -749,6 +751,7 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
'tardigrade-satellite': scope.tardigrade_satellite,
'tardigrade-api-key': scope.tardigrade_api_key,
'tardigrade-secret': scope.tardigrade_secret,
+ 'tardigrade-secret-verify': scope.tardigrade_secret_verify,
'tardigrade-shared-access': scope.tardigrade_shared_access,
'tardigrade-bucket': scope.tardigrade_bucket,
'tardigrade-folder': scope.tardigrade_folder
@@ -1111,6 +1114,12 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
};
EditUriBackendConfig.validaters['tardigrade'] = function (scope, continuation) {
+ var res = true;
+
+ if(scope['tardigrade_auth_method'] == 'API key' && scope['tardigrade_secret'] != scope['tardigrade_secret_verify'])
+ res = EditUriBackendConfig.show_error_dialog(gettextCatalog.getString('The encryption passphrases do not match'));
+
+ if (res)
continuation();
};
diff --git a/Duplicati/Server/webroot/ngax/templates/backends/tardigrade.html b/Duplicati/Server/webroot/ngax/templates/backends/tardigrade.html
index eaa094c69..0131cab56 100644
--- a/Duplicati/Server/webroot/ngax/templates/backends/tardigrade.html
+++ b/Duplicati/Server/webroot/ngax/templates/backends/tardigrade.html
@@ -25,6 +25,10 @@
<label for="tardigrade_secret" translate>Encryption passphrase</label>
<input autocomplete="new-password" type="password" name="tardigrade_secret" id="tardigrade_secret" ng-model="$parent.tardigrade_secret" placeholder="{{'The encryption passphrase' | translate}}" />
</div>
+<div class="input password" ng-show="$parent.tardigrade_auth_method == 'API key'">
+ <label for="tardigrade_secret_verify" translate>Verify encryption passphrase</label>
+ <input autocomplete="new-password" type="password" name="tardigrade_secret_verify" id="tardigrade_secret_verify" ng-model="$parent.tardigrade_secret_verify" placeholder="{{'The encryption passphrase (for verification)' | translate}}" />
+</div>
<div class="input text" ng-show="$parent.tardigrade_auth_method == 'Access grant'">
<label for="tardigrade_shared_access" translate>Access grant</label>
<input type="text" name="tardigrade_shared_access" id="tardigrade_shared_access" ng-model="$parent.tardigrade_shared_access" placeholder="{{'The access grant instead of the info above'}}" />