Skip to content

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

fix(pam): resolve lint errors in web access session handling

bernie-g931710988d17
diff --git a/backend/src/ee/services/pam-web-access/pam-rdp-session-handler.ts b/backend/src/ee/services/pam-web-access/pam-rdp-session-handler.ts
index 34453081f5..cfea0c49db 100644
--- a/backend/src/ee/services/pam-web-access/pam-rdp-session-handler.ts
+++ b/backend/src/ee/services/pam-web-access/pam-rdp-session-handler.ts
@@ -40,8 +40,7 @@ export const handleRdpSession = async (ctx: TSessionContext): Promise<TSessionHa
releaseEarlyBuffer();
for (const msg of earlyMessages) {
- if (!msg.isBinary) continue;
- if (tcpSocket.writable) {
+ if (msg.isBinary && tcpSocket.writable) {
tcpSocket.write(msg.data);
}
}
diff --git a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
index 2502db8112..299498d3e5 100644
--- a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
+++ b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
@@ -77,7 +77,7 @@ type TPamWebAccessServiceFactoryDep = {
permissionService: Pick<TPermissionServiceFactory, "getProjectPermission">;
auditLogService: Pick<TAuditLogServiceFactory, "createAuditLog">;
tokenService: Pick<TAuthTokenServiceFactory, "createTokenForUser">;
- pamSessionDAL: Pick<TPamSessionDALFactory, "create" | "updateById" | "countActiveWebSessions">;
+ pamSessionDAL: Pick<TPamSessionDALFactory, "create" | "updateById" | "countActiveWebSessions" | "endSessionById">;
pamSessionExpirationService: Pick<TPamSessionExpirationServiceFactory, "scheduleSessionExpiration">;
gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPAMConnectionDetails">;
gatewayPoolService: Pick<TGatewayPoolServiceFactory, "resolveEffectiveGatewayId">;
diff --git a/frontend/src/pages/pam/PamAccountAccessPage/useRdpSession.ts b/frontend/src/pages/pam/PamAccountAccessPage/useRdpSession.ts
index d2cee137d1..40c833a5e1 100644
--- a/frontend/src/pages/pam/PamAccountAccessPage/useRdpSession.ts
+++ b/frontend/src/pages/pam/PamAccountAccessPage/useRdpSession.ts
@@ -18,7 +18,8 @@ const DEFAULT_DESKTOP_SIZE = { width: 1920, height: 1080 };
const STATUS_BAR_HEIGHT = 33;
// WASM reads window.innerHeight for fit scaling, not the container
-const innerHeightDescriptor = Object.getOwnPropertyDescriptor(window, "innerHeight") ??
+const innerHeightDescriptor =
+ Object.getOwnPropertyDescriptor(window, "innerHeight") ??
Object.getOwnPropertyDescriptor(Window.prototype, "innerHeight");
let innerHeightOverrideCount = 0;