Fixed decrypt/re-encrypt toggling
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Duplicati.Server.Database
|
||||
public const string PBKDF_CONFIG = "pbkdf-config";
|
||||
public const string AUTOGENERATED_PASSPHRASE = "autogenerated-passphrase";
|
||||
public const string DISABLE_VISUAL_CAPTCHA = "disable-visual-captcha";
|
||||
public const string ENCRYPTION_CANARY_TOKEN = "encryption-canary-token";
|
||||
public const string ENCRYPTED_FIELDS = "encrypted-fields";
|
||||
}
|
||||
|
||||
private readonly Dictionary<string, string> settings;
|
||||
@@ -653,16 +653,16 @@ namespace Duplicati.Server.Database
|
||||
}
|
||||
}
|
||||
|
||||
public string EncryptionCanaryToken
|
||||
public bool EncryptedFields
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings[CONST.ENCRYPTION_CANARY_TOKEN];
|
||||
return Duplicati.Library.Utility.Utility.ParseBool(settings[CONST.ENCRYPTED_FIELDS], false);
|
||||
}
|
||||
set
|
||||
{
|
||||
lock (databaseConnection.m_lock)
|
||||
settings[CONST.ENCRYPTION_CANARY_TOKEN] = value;
|
||||
settings[CONST.ENCRYPTED_FIELDS] = value.ToString();
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user