Skip to content

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

fix(pam): remove unnecessary trailing semicolon stripping

bernie-gac02ef6aac42
diff --git a/backend/src/ee/services/pam-web-access/pam-postgres-session-handler.ts b/backend/src/ee/services/pam-web-access/pam-postgres-session-handler.ts
index 90aacb13b3..43d3d89c22 100644
--- a/backend/src/ee/services/pam-web-access/pam-postgres-session-handler.ts
+++ b/backend/src/ee/services/pam-web-access/pam-postgres-session-handler.ts
@@ -1,7 +1,6 @@
import { parse as parseSql } from "libpg-query";
import pg from "pg";
import Cursor from "pg-cursor";
-import RE2 from "re2";
import {
TPostgresAccountCredentials,
@@ -256,7 +255,7 @@ export const handlePostgresSession = async (
const location = s.stmt_location ?? 0;
return s.stmt_len !== undefined
? message.sql.slice(location, location + s.stmt_len)
- : message.sql.slice(location).trimEnd().replace(new RE2(";+$"), "").trim();
+ : message.sql.slice(location).trim();
});
let lastRows: Record<string, unknown>[] = [];