Skip to content

Commit 577ff98

Browse files
committed
fix: remove unused util giving SAST error
1 parent c2150ce commit 577ff98

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

worker/utils/passwordService.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,4 @@ export class PasswordService {
7272
validatePassword(password: string, userInfo?: { email?: string; name?: string }): PasswordValidationResult {
7373
return validatePassword(password, undefined, userInfo);
7474
}
75-
76-
/**
77-
* Generate a secure random password
78-
*/
79-
generatePassword(length: number = 16): string {
80-
const charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=[]{}|;:,.<>?';
81-
const values = crypto.getRandomValues(new Uint8Array(length));
82-
83-
let password = '';
84-
for (let i = 0; i < length; i++) {
85-
password += charset[values[i] % charset.length];
86-
}
87-
88-
return password;
89-
}
90-
9175
}

0 commit comments

Comments
 (0)