'Clever' stateless token verification. We could revert later if it sucks.

This commit is contained in:
lewis
2025-12-24 23:57:49 +02:00
parent 1280f8044d
commit d8451f3219
77 changed files with 3029 additions and 1339 deletions
+51 -13
View File
@@ -458,19 +458,57 @@ pub fn validate_password(password: &str) -> Result<(), PasswordValidationError>
fn is_common_password(password: &str) -> bool {
const COMMON_PASSWORDS: &[&str] = &[
"password", "Password1", "Password123", "Passw0rd", "Passw0rd!",
"12345678", "123456789", "1234567890",
"qwerty123", "Qwerty123", "qwertyui", "Qwertyui",
"letmein1", "Letmein1", "welcome1", "Welcome1",
"admin123", "Admin123", "password1", "Password1!",
"iloveyou", "Iloveyou1", "monkey123", "Monkey123",
"dragon12", "Dragon123", "master12", "Master123",
"login123", "Login123", "abc12345", "Abc12345",
"football", "Football1", "baseball", "Baseball1",
"trustno1", "Trustno1", "sunshine", "Sunshine1",
"princess", "Princess1", "computer", "Computer1",
"whatever", "Whatever1", "nintendo", "Nintendo1",
"bluesky1", "Bluesky1", "Bluesky123",
"password",
"Password1",
"Password123",
"Passw0rd",
"Passw0rd!",
"12345678",
"123456789",
"1234567890",
"qwerty123",
"Qwerty123",
"qwertyui",
"Qwertyui",
"letmein1",
"Letmein1",
"welcome1",
"Welcome1",
"admin123",
"Admin123",
"password1",
"Password1!",
"iloveyou",
"Iloveyou1",
"monkey123",
"Monkey123",
"dragon12",
"Dragon123",
"master12",
"Master123",
"login123",
"Login123",
"abc12345",
"Abc12345",
"football",
"Football1",
"baseball",
"Baseball1",
"trustno1",
"Trustno1",
"sunshine",
"Sunshine1",
"princess",
"Princess1",
"computer",
"Computer1",
"whatever",
"Whatever1",
"nintendo",
"Nintendo1",
"bluesky1",
"Bluesky1",
"Bluesky123",
];
let lower = password.to_lowercase();