|
|
@ -705,7 +705,7 @@ make_config! { |
|
|
/// Disable Two-Factor remember |> Enabling this would force the users to use a second factor to login every time.
|
|
|
/// Disable Two-Factor remember |> Enabling this would force the users to use a second factor to login every time.
|
|
|
/// Note that the checkbox would still be present, but ignored.
|
|
|
/// Note that the checkbox would still be present, but ignored.
|
|
|
disable_2fa_remember: bool, true, def, false; |
|
|
disable_2fa_remember: bool, true, def, false; |
|
|
/// Two-Factor remember duration |> Number of days before a remembered Two-Factor login expires (min: 1, max: 3650).
|
|
|
/// Two-Factor remember duration |> Number of days before a remembered Two-Factor login expires (min: 1, max: 365).
|
|
|
two_factor_remember_days: i64, true, def, 30; |
|
|
two_factor_remember_days: i64, true, def, 30; |
|
|
|
|
|
|
|
|
/// Disable authenticator time drifted codes to be valid |> Enabling this only allows the current TOTP code to be valid
|
|
|
/// Disable authenticator time drifted codes to be valid |> Enabling this only allows the current TOTP code to be valid
|
|
|
@ -1211,8 +1211,8 @@ fn validate_config(cfg: &ConfigItems, on_update: bool) -> Result<(), Error> { |
|
|
err!("`INVITATION_EXPIRATION_HOURS` has a minimum duration of 1 hour") |
|
|
err!("`INVITATION_EXPIRATION_HOURS` has a minimum duration of 1 hour") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if !(1..=3650).contains(&cfg.two_factor_remember_days) { |
|
|
if !(1..=365).contains(&cfg.two_factor_remember_days) { |
|
|
err!("`TWO_FACTOR_REMEMBER_DAYS` must be between 1 and 3650 days") |
|
|
err!("`TWO_FACTOR_REMEMBER_DAYS` must be between 1 and 365 days") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Validate schedule crontab format
|
|
|
// Validate schedule crontab format
|
|
|
|