Browse Source

test(password): replace realistic fixtures with obviously-synthetic strings

  GitGuardian flagged "Bambuddy1!" and "LongerP@ssw0rd!" in password.test.ts
  as potential leaked credentials. Replace with patterned placeholders
  ("Aa1!aaaa", "Aa1!Aa1!Aa1!") that still satisfy every complexity rule
  (upper/lower/digit/special, >=8 chars) but won't trip secret scanners.
maziggy 2 weeks ago
parent
commit
1303cd2701
1 changed files with 2 additions and 2 deletions
  1. 2 2
      frontend/src/__tests__/utils/password.test.ts

+ 2 - 2
frontend/src/__tests__/utils/password.test.ts

@@ -30,8 +30,8 @@ describe('checkPasswordComplexity', () => {
   });
   });
 
 
   it('returns null for a password that meets every rule', () => {
   it('returns null for a password that meets every rule', () => {
-    expect(checkPasswordComplexity('Bambuddy1!')).toBeNull();
-    expect(checkPasswordComplexity('LongerP@ssw0rd!')).toBeNull();
+    expect(checkPasswordComplexity('Aa1!aaaa')).toBeNull();
+    expect(checkPasswordComplexity('Aa1!Aa1!Aa1!')).toBeNull();
   });
   });
 
 
   it('handles a password from the #1303 user (8 digits) — the original failure mode', () => {
   it('handles a password from the #1303 user (8 digits) — the original failure mode', () => {