History

[autofix.ci] apply automated fixes

autofix-ci[bot] committed 10 months ago

Commit 13b64e41 parent fe5efd71 file · +4 −3Browse files

Unified · Split

apps/dokploy/lib/password-utils.ts+4−3
@@ -6,9 +6,10 @@ export const generateRandomPassword = ( · 5 unmodified lines
6 length: number = DEFAULT_PASSWORD_LENGTH,6 length: number = DEFAULT_PASSWORD_LENGTH,
7 charset: string = DEFAULT_PASSWORD_CHARSET,7 charset: string = DEFAULT_PASSWORD_CHARSET,
8) => {8) => {
9 const safeLength = Number.isFinite(length) && length > 09 const safeLength =
10 ? Math.floor(length)10 Number.isFinite(length) && length > 0
11 : DEFAULT_PASSWORD_LENGTH;11 ? Math.floor(length)
12 : DEFAULT_PASSWORD_LENGTH;
12 13
13 if (safeLength <= 0 || charset.length === 0) {14 if (safeLength <= 0 || charset.length === 0) {
14 return "";15 return "";