Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Update PasswordGenerator.tsx
Daniel Hougaard02620d451f5f
diff --git a/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx b/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsxindex eccba7a6fc..5ce175eabc 100644--- a/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx+++ b/frontend/src/components/v3/generic/PasswordGenerator/PasswordGenerator.tsx@@ -79,7 +79,7 @@ const generateFromConstraints = (constraints: TConstraint[]): string => {const minLength = minLengthStr ? parseInt(minLengthStr, 10) : 16;const maxLength = maxLengthStr ? parseInt(maxLengthStr, 10) : 64;- let middle = "";+ let middle: string | undefined;if (regexValue) {// Regex takes full precedence over min/max length constraints@@ -90,7 +90,7 @@ const generateFromConstraints = (constraints: TConstraint[]): string => {}}- if (!middle) {+ if (middle === undefined) {const fixedLength = prefix.length + suffix.length;const targetMin = Math.max(minLength - fixedLength, 1);const targetMax = Math.max(maxLength - fixedLength, 1);