Skip to content

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

fix(frontend): update type definitions and handling for null multiline encode

Scott Wilsona99192487f29
diff --git a/frontend/src/hooks/api/secrets/types.ts b/frontend/src/hooks/api/secrets/types.ts
index b85e106363..0d0ecb8200 100644
--- a/frontend/src/hooks/api/secrets/types.ts
+++ b/frontend/src/hooks/api/secrets/types.ts
@@ -38,7 +38,7 @@ export type SecretV3RawSanitized = {
idOverride?: string;
overrideAction?: string;
folderId?: string;
- skipMultilineEncoding?: boolean;
+ skipMultilineEncoding?: boolean | null;
secretMetadata?: { key: string; value: string; isEncrypted?: boolean }[];
isReminderEvent?: boolean;
isRotatedSecret?: boolean;
@@ -160,7 +160,7 @@ export type TCreateSecretsV3DTO = {
secretKey: string;
secretValue: string;
secretComment: string;
- skipMultilineEncoding?: boolean;
+ skipMultilineEncoding?: boolean | null;
secretPath: string;
projectId: string;
environment: string;
@@ -173,7 +173,7 @@ export type TUpdateSecretsV3DTO = {
environment: string;
secretPath: string;
type: SecretType;
- skipMultilineEncoding?: boolean;
+ skipMultilineEncoding?: boolean | null;
newSecretName?: string;
secretKey: string;
secretValue?: string;
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretMainPage.store.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretMainPage.store.tsx
index d83b1977a0..d3172142ba 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretMainPage.store.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretMainPage.store.tsx
@@ -25,7 +25,7 @@ export interface PendingSecretCreate extends BasePendingChange {
secretKey: string;
secretValue: string;
secretComment?: string;
- skipMultilineEncoding?: boolean;
+ skipMultilineEncoding?: boolean | null;
tags?: { id: string; slug: string }[];
secretMetadata?: { key: string; value: string; isEncrypted?: boolean }[];
originalKey?: string;
@@ -40,8 +40,8 @@ export interface PendingSecretUpdate extends BasePendingChange {
secretValue?: string;
originalComment?: string;
secretComment?: string;
- originalSkipMultilineEncoding?: boolean;
- skipMultilineEncoding?: boolean;
+ originalSkipMultilineEncoding?: boolean | null;
+ skipMultilineEncoding?: boolean | null;
originalTags?: { id: string; slug: string }[];
tags?: { id: string; slug: string }[];
originalSecretMetadata?: { key: string; value: string }[];
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx
index 632397e3e6..3642cf2da9 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx
@@ -484,7 +484,7 @@ export const SecretDetailSidebar = ({
<Switch
id="skipmultiencoding-option"
onCheckedChange={(isChecked) => onChange(isChecked)}
- isChecked={value}
+ isChecked={value ?? false}
onBlur={onBlur}
isDisabled={!isAllowed}
className="items-center justify-between"
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx
index b6d358453b..dfcaecc226 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretListView.tsx
@@ -132,7 +132,7 @@ export const SecretListView = ({
reminderNote: string | null;
reminderRecipients?: string[] | null;
tags: string[];
- skipMultilineEncoding: boolean;
+ skipMultilineEncoding: boolean | null;
newKey: string;
secretId: string;
secretMetadata?: { key: string; value: string }[];