Skip to content

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

misc: updated session log update validation

Sheen Capadngan965850ba6e02
diff --git a/backend/src/ee/services/pam-session/pam-session-service.ts b/backend/src/ee/services/pam-session/pam-session-service.ts
index c17144a3d0..7133833066 100644
--- a/backend/src/ee/services/pam-session/pam-session-service.ts
+++ b/backend/src/ee/services/pam-session/pam-session-service.ts
@@ -95,8 +95,8 @@ export const pamSessionServiceFactory = ({
const session = await pamSessionDAL.findById(sessionId);
if (!session) throw new NotFoundError({ message: `Session with ID '${sessionId}' not found` });
- if (session.status !== PamSessionStatus.Active) {
- throw new BadRequestError({ message: "Cannot update logs for sessions that are not active" });
+ if (session.encryptedLogsBlob) {
+ throw new BadRequestError({ message: "Cannot update logs for sessions with existing logs" });
}
const project = await projectDAL.findById(session.projectId);