Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix(ldap): refine referral domain validation in buildReferralUrl function
Victor Hugo dos Santos63a8aeaf5db6
diff --git a/backend/src/services/app-connection/ldap/ldap-connection-fns.ts b/backend/src/services/app-connection/ldap/ldap-connection-fns.tsindex 44ade944ea..8e9d1aa96e 100644--- a/backend/src/services/app-connection/ldap/ldap-connection-fns.ts+++ b/backend/src/services/app-connection/ldap/ldap-connection-fns.ts@@ -84,7 +84,7 @@ export const buildReferralUrl = (originalUrl: string, targetDomain: string): strconst originalRoot = getRootDomain(host);const targetRoot = getRootDomain(targetDomain);- if (originalRoot && targetRoot && originalRoot !== targetRoot) {+ if (originalRoot && (!targetRoot || originalRoot !== targetRoot)) {throw new Error(`Referral domain '${targetDomain}' is outside the trust boundary of '${host}' — refusing to forward credentials`);