mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-09-19 00:34:15 +00:00
'Clever' stateless token verification. We could revert later if it sucks.
This commit is contained in:
+51
-13
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user