Skip to content

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

Fix empty file infinite load

x032205e4d90eb055db
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx
index 126306e3de..d7cb87da77 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretDropzone/SecretDropzone.tsx
@@ -241,7 +241,14 @@ export const SecretDropzone = ({
setIsLoading.on();
reader.onload = (event) => {
- if (!event?.target?.result) return;
+ if (!event?.target?.result) {
+ createNotification({
+ type: "error",
+ text: "Invalid file contents."
+ });
+ setIsLoading.off();
+ return;
+ }
let env: TParsedEnv;