We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c8a19e commit 4316a09Copy full SHA for 4316a09
1 file changed
ui/packages/shared/helpers/getEntropy.ts
@@ -178,7 +178,8 @@ function getSecureRandomInt(max: number): number {
178
179
export function generatePassword(length: number = 16): string {
180
const minLength = 4
181
- const actualLength = Math.max(length, minLength)
+ const maxLength = 128
182
+ const actualLength = Math.max(Math.min(length, maxLength), minLength)
183
184
const lowercase = 'abcdefghijklmnopqrstuvwxyz'
185
const uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
0 commit comments