A session alone could change the password, switch the second factor on or off, send the key of the language model to another address and remove the rules that stop purchases. Each now needs the password and the code, with one limit on wrong attempts that a restart of the services does not clear, and the other sessions end when the password or the factor changes. Requests to the brokers pass a list of allowed calls, never follow a redirect with a key and are signed by one client only. Pages are closed by default, nothing is cached, requests are limited to 1 MB, secrets are masked in logs and notifications, exported tables cannot run as formulas, archives carry no sessions and the container refuses to run as root. refs #68 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.4 KiB
C#
32 lines
1.4 KiB
C#
namespace Anubis.Server;
|
|
|
|
/// <summary>Titles of the service page, also used in plain answers while the application is not ready.</summary>
|
|
internal static class ServiceText
|
|
{
|
|
public static string Title(HostMode mode) => mode switch
|
|
{
|
|
HostMode.Starting => "Anubis si sta avviando",
|
|
HostMode.ConfigProblem => "Manca qualcosa nella configurazione d'avvio",
|
|
HostMode.FirstRun => "Anubis va configurato",
|
|
HostMode.DatabaseUnavailable => "Il database non risponde",
|
|
HostMode.SchemaProblem => "Il database non è compatibile con questa versione",
|
|
HostMode.IdentityProblem => "Il database non è quello di questa installazione",
|
|
_ => "Anubis",
|
|
};
|
|
}
|
|
|
|
/// <summary>Messages of the password forms.</summary>
|
|
internal static class PasswordMessages
|
|
{
|
|
public static string? For(string? code) => code switch
|
|
{
|
|
"diverse" => "Le due password non coincidono. Scrivile di nuovo.",
|
|
"corta" => $"La password è troppo corta: servono almeno {Access.Passwords.MinimumLength} caratteri.",
|
|
"uguale" => "La nuova password deve essere diversa da quella iniziale.",
|
|
"attuale" => "La password attuale non è giusta.",
|
|
"attesa" => "Troppi tentativi sbagliati: aspetta 15 minuti e riprova.",
|
|
"demo" => "Nella modalità dimostrativa la password non si cambia.",
|
|
_ => null,
|
|
};
|
|
}
|