Skip to content

Commit 4c7e99a

Browse files
committed
create more secure random PWs for DB
1 parent ad1cbb2 commit 4c7e99a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/users/ldap/ldapusers.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class LdapUsersService implements Users {
9191
firstName: ldapEntry[this.ldapConfig.attributeFirstName].toString(),
9292
lastName: ldapEntry[this.ldapConfig.attributeLastName].toString(),
9393
apiKey: this.authService.generateApiKey(),
94-
password: await this.authService.encryptPassword(Math.random().toString(36).slice(-8)),
94+
password: await this.authService.encryptPassword(crypto.randomUUID().slice(-8)),
9595
role: Role.editor,
9696
};
9797

0 commit comments

Comments
 (0)