Skip to content

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

fix(approvals): encode policy type in approval email link

bernie-g6043347434d9
diff --git a/backend/src/services/approval-policy/approval-policy-service.ts b/backend/src/services/approval-policy/approval-policy-service.ts
index 02096c930a..abc06635af 100644
--- a/backend/src/services/approval-policy/approval-policy-service.ts
+++ b/backend/src/services/approval-policy/approval-policy-service.ts
@@ -146,7 +146,7 @@ export const approvalPolicyServiceFactory = ({
try {
const project = await projectDAL.findById(request.projectId);
- const approvalUrl = `${cfg.SITE_URL}/organizations/${request.organizationId}/projects/cert-manager/${request.projectId}/approvals/${request.id}?policyType=${request.type}`;
+ const approvalUrl = `${cfg.SITE_URL}/organizations/${request.organizationId}/projects/cert-manager/${request.projectId}/approvals/${request.id}?policyType=${encodeURIComponent(request.type)}`;
await sendApprovalEmailsForStep(
step,