Skip to content

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

Make it impossible to log in with the ghost user

Daniel Hougaard6dcab6646cac
diff --git a/backend/src/services/user/user-dal.ts b/backend/src/services/user/user-dal.ts
index 7b54e7c10d..086ad59311 100644
--- a/backend/src/services/user/user-dal.ts
+++ b/backend/src/services/user/user-dal.ts
@@ -23,7 +23,7 @@ export const userDALFactory = (db: TDbClient) => {
const findUserEncKeyByEmail = async (email: string) => {
try {
return await db(TableName.Users)
- .where({ email })
+ .where({ email, ghost: false })
.join(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`)
.first();
} catch (error) {