Skip to content

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

fix: clarify description for Windows Local Account rotation credentials and update regex handling in SMB RPC client

Victor Santos64f80ee272ca
diff --git a/backend/src/ee/routes/v2/secret-rotation-v2-routers/windows-local-account-rotation-router.ts b/backend/src/ee/routes/v2/secret-rotation-v2-routers/windows-local-account-rotation-router.ts
index 5056adc081..6c9d1322db 100644
--- a/backend/src/ee/routes/v2/secret-rotation-v2-routers/windows-local-account-rotation-router.ts
+++ b/backend/src/ee/routes/v2/secret-rotation-v2-routers/windows-local-account-rotation-router.ts
@@ -38,7 +38,7 @@ export const registerWindowsLocalAccountRotationRouter = async (server: FastifyZ
hide: false,
tags: [ApiDocsTags.SecretRotations],
description:
- "Reconcile Windows Local Account rotation credentials. This operation uses the SSH app connection credentials to reset the password when credentials are out of sync.",
+ "Reconcile Windows Local Account rotation credentials. This operation uses the Windows App Connection's administrator credentials to reset the password when credentials are out of sync.",
params: z.object({
rotationId: z.string().uuid().describe(SecretRotations.RECONCILE.rotationId)
}),
diff --git a/backend/src/lib/smb-rpc/smb-rpc-client.ts b/backend/src/lib/smb-rpc/smb-rpc-client.ts
index a27cccfd6b..31e69b662c 100644
--- a/backend/src/lib/smb-rpc/smb-rpc-client.ts
+++ b/backend/src/lib/smb-rpc/smb-rpc-client.ts
@@ -2,6 +2,7 @@ import { spawn } from "child_process";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
+import RE2 from "re2";
import { logger } from "@app/lib/logger";
@@ -93,7 +94,7 @@ const executeCommand = (
* Parse NT_STATUS errors from command output
*/
const parseNtStatusError = (output: string): string | null => {
- const match = output.match(/NT_STATUS_[A-Z_]+/);
+ const match = new RE2(/NT_STATUS_[A-Z_]+/).exec(output);
return match ? match[0] : null;
};
@@ -157,7 +158,7 @@ const testSmbConnection = async (config: SmbRpcConfig): Promise<void> => {
* The password is wrapped in single quotes, with internal single quotes escaped
*/
const escapePasswordForRpc = (password: string): string => {
- return password.replace(/'/g, "'\\''");
+ return new RE2(/'/g).replace(password, "'\\''");
};
/**