Skip to content

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

requested changes

Daniel Hougaard9948cdb3797c
diff --git a/frontend/src/components/v2/Input/Input.tsx b/frontend/src/components/v2/Input/Input.tsx
index 398c6410d1..fa3982abd1 100644
--- a/frontend/src/components/v2/Input/Input.tsx
+++ b/frontend/src/components/v2/Input/Input.tsx
@@ -118,7 +118,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
onInput={handleInput}
className={twMerge(
leftIcon ? "pl-10" : "pl-2.5",
- rightIcon ? "pr-10" : "pr-2.5",
+ rightIcon || warning ? "pr-10" : "pr-2.5",
inputVariants({ className, isError, size, isRounded, variant })
)}
/>
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx
index 4f64d950df..8e40ef40de 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem.tsx
@@ -487,6 +487,30 @@ export const SecretItem = memo(
placeholder={error?.message}
isError={Boolean(error)}
onKeyUp={() => trigger("key")}
+ warning={
+ field?.value !== (originalSecret.originalKey || originalSecret.key) &&
+ field.value?.includes(" ") ? (
+ <Tooltip
+ className={"w-full max-w-72"}
+ content={
+ <div>
+ Secret key contains whitespaces.
+ <br />
+ <br /> If this is the desired format, you need to provide it as{" "}
+ <code className="rounded-md bg-mineshaft-500 px-1 py-0.5">
+ {encodeURIComponent(field.value.trim())}
+ </code>{" "}
+ when making API requests.
+ </div>
+ }
+ >
+ <FontAwesomeIcon
+ icon={faWarning}
+ className="text-yellow-600 opacity-60"
+ />
+ </Tooltip>
+ ) : undefined
+ }
{...field}
className="w-full px-0 placeholder:text-red-500 focus:text-bunker-100 focus:ring-transparent"
/>