Added option to disable visual captcha from commandline.
This fixes #5098
This commit is contained in:
@@ -58,6 +58,7 @@ namespace Duplicati.Server.Database
|
||||
public const string JWT_CONFIG = "jwt-config";
|
||||
public const string PBKDF_CONFIG = "pbkdf-config";
|
||||
public const string AUTOGENERATED_PASSPHRASE = "autogenerated-passphrase";
|
||||
public const string DISABLE_VISUAL_CAPTCHA = "disable-visual-captcha";
|
||||
}
|
||||
|
||||
private readonly Dictionary<string, string> settings;
|
||||
@@ -273,6 +274,20 @@ namespace Duplicati.Server.Database
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisableVisualCaptcha
|
||||
{
|
||||
get
|
||||
{
|
||||
return Duplicati.Library.Utility.Utility.ParseBool(settings[CONST.DISABLE_VISUAL_CAPTCHA], false);
|
||||
}
|
||||
set
|
||||
{
|
||||
lock (databaseConnection.m_lock)
|
||||
settings[CONST.DISABLE_VISUAL_CAPTCHA] = value.ToString();
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
public int LastWebserverPort
|
||||
{
|
||||
get
|
||||
|
||||
@@ -45,6 +45,7 @@ Error message: {0}", error); }
|
||||
public static string TempdirLong { get { return LC.L(@"Use this option to supply an alternative folder for temporary storage. By default the system default temporary folder is used. Note that also SQLite will put temporary files in this temporary folder."); } }
|
||||
public static string TempdirShort { get { return LC.L(@"Temporary storage folder"); } }
|
||||
public static string WebserverResetJwtConfigDescription { get { return LC.L(@"Resets the JWT configuration, invalidating any issued login tokens"); } }
|
||||
public static string WebserverDisableVisualCaptchaDescription { get { return LC.L(@"Disables the visual captcha"); } }
|
||||
}
|
||||
internal static class Scheduler
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user