Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix lint

Matheus Nogueiraf27033776d96
diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx
index 277954658a..ddf01cc36f 100644
--- a/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx
+++ b/frontend/src/pages/secret-manager/SettingsPage/components/SecretValidationRulesSection/SecretValidationRulesSection.tsx
@@ -209,18 +209,18 @@ const RuleFormContent = ({
return Boolean(hasRegex && hasLength);
})();
- const watchedProviders = form.watch("enforcement.inputs.providers" as "enforcement.inputs") as
- | string[]
- | undefined;
// Oracle 12c and older limits passwords to 30 characters. Show a heads-up
// when OracleDB is selected and a constraint actually exceeds that limit:
// min/max length > 30, or any regex (whose output length can't be checked
// statically).
const ORACLE_12C_MAX_PASSWORD_LENGTH = 30;
+ const watchedEnforcement = form.watch("enforcement");
const showOracleLengthWarning = (() => {
- if (watchedRuleType !== RuleType.SecretRotations) return false;
- const hasOracle = watchedProviders?.includes(SecretRotationRuleProvider.OracleDBCredentials);
- if (!hasOracle) return false;
+ if (watchedEnforcement.type !== RuleType.SecretRotations) return false;
+ if (
+ !watchedEnforcement.inputs.providers.includes(SecretRotationRuleProvider.OracleDBCredentials)
+ )
+ return false;
return watchedConstraints?.some((c) => {
if (c.type === ConstraintType.RegexPattern) return true;
if (c.type === ConstraintType.MinLength || c.type === ConstraintType.MaxLength) {