Skip to content

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

fix(pam): coerce SSH port input to number in validation schema

ShivaReddyVanjaebee23190ef3
diff --git a/frontend/src/pages/pam/PamResourcesPage/components/PamResourceForm/SSHResourceForm.tsx b/frontend/src/pages/pam/PamResourcesPage/components/PamResourceForm/SSHResourceForm.tsx
index 59e807129c..1269c5369e 100644
--- a/frontend/src/pages/pam/PamResourcesPage/components/PamResourceForm/SSHResourceForm.tsx
+++ b/frontend/src/pages/pam/PamResourcesPage/components/PamResourceForm/SSHResourceForm.tsx
@@ -15,7 +15,7 @@ type Props = {
const BaseSshConnectionDetailsSchema = z.object({
host: z.string().trim().min(1, "Host is required"),
- port: z.number().int().min(1).max(65535)
+ port: z.coerce.number().int().min(1).max(65535)
});
const formSchema = genericResourceFieldsSchema.extend({