Skip to content

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

improvements: address feedback

Scott Wilson0cfa419e243b
diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
index 573f11fa4d..aed9ff2eb2 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
@@ -3489,7 +3489,7 @@ const OverviewPageContent = () => {
isBatchMode={isBatchModeActive}
onSecretCreated={checkSecretsActivation}
onUploadSecrets={(env) => {
- if (env) setImportParsedSecrets(env);
+ setImportParsedSecrets(env ?? null);
handlePopUpClose("addSecretsInAllEnvs");
handlePopUpOpen("importSecrets");
}}
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
index 72465c9a12..f84e73d7bd 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
@@ -89,12 +89,12 @@ type TFormSchema = z.infer<typeof formSchema>;
type TParsedEnv = Record<string, { value: string; comments: string[] }>;
-// Parse pasted content as .env lines, dropping pairs without a real value so base64 padding
-// lines ("abc==") in a pasted PEM/private key don't register as KEY=VALUE pairs.
+// Parse pasted content as .env lines. Pastes containing a PEM block (certificate/key chains)
+// are excluded entirely: their base64 padding lines ("abc==") would otherwise register as
+// KEY=VALUE pairs, and such a paste is a single secret value, not a bulk paste. Entries with
+// empty values are kept since they are valid secrets in the import flows.
const getParsedEnvPairs = (content: string): TParsedEnv =>
- Object.fromEntries(
- Object.entries(parseDotEnv(content)).filter(([, v]) => v.value && v.value !== "=")
- );
+ content.includes("-----BEGIN") ? {} : parseDotEnv(content);
type Props = {
secretPath?: string;