fix: tighten password and surface persistence errors

This commit is contained in:
Your Name
2026-05-28 20:38:34 +08:00
parent caad1aba0c
commit 9cc5892565
7 changed files with 228 additions and 11 deletions

View File

@@ -138,8 +138,15 @@ func TestValidatePasswordStrength(t *testing.T) {
wantErr: true,
},
{
name: "valid_weak_password_non_strict",
password: "Abcd1234",
name: "boundary_password_requires_three_character_classes",
password: "abcd1234",
minLength: 8,
strict: false,
wantErr: true,
},
{
name: "longer_password_allows_two_character_classes",
password: "abcdefgh1234",
minLength: 8,
strict: false,
wantErr: false,