Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: return fastify res and making it async
=905cf47d9096
diff --git a/backend/src/server/plugins/secret-scanner.ts b/backend/src/server/plugins/secret-scanner.tsindex 96ad5c72cb..65dbbb87f3 100644--- a/backend/src/server/plugins/secret-scanner.ts+++ b/backend/src/server/plugins/secret-scanner.ts@@ -65,7 +65,7 @@ export const registerSecretScannerGhApp = async (server: FastifyZodProvider) =>payload: JSON.stringify(req.body),signature: signatureSHA256});- void res.send("ok");+ return res.send("ok");}});}diff --git a/backend/src/server/plugins/serve-ui.ts b/backend/src/server/plugins/serve-ui.tsindex 6bcc59d003..9f91d9774e 100644--- a/backend/src/server/plugins/serve-ui.ts+++ b/backend/src/server/plugins/serve-ui.ts@@ -34,7 +34,7 @@ export const registerServeUI = async (TELEMETRY_CAPTURING_ENABLED: appCfg.TELEMETRY_ENABLED};const js = `window.__INFISICAL_RUNTIME_ENV__ = Object.freeze(${JSON.stringify(config)});`;- void res.send(js);+ return res.send(js);}});@@ -57,7 +57,7 @@ export const registerServeUI = async (reply.callNotFound();return;}- void reply.sendFile("index.html");+ return reply.sendFile("index.html");}});}diff --git a/backend/src/services/identity-ua/identity-ua-service.ts b/backend/src/services/identity-ua/identity-ua-service.tsindex 848b536bab..fdb7acd523 100644--- a/backend/src/services/identity-ua/identity-ua-service.ts+++ b/backend/src/services/identity-ua/identity-ua-service.ts@@ -69,9 +69,15 @@ export const identityUaServiceFactory = ({isClientSecretRevoked: false});- const validClientSecretInfo = clientSecrtInfo.find(({ clientSecretHash }) =>- bcrypt.compareSync(clientSecret, clientSecretHash)- );+ let validClientSecretInfo: (typeof clientSecrtInfo)[0] | null = null;+ for await (const info of clientSecrtInfo) {+ const isMatch = await bcrypt.compare(clientSecret, info.clientSecretHash);+ if (isMatch) {+ validClientSecretInfo = info;+ break;+ }+ }+if (!validClientSecretInfo) throw new UnauthorizedError({ message: "Invalid credentials" });const { clientSecretTTL, clientSecretNumUses, clientSecretNumUsesLimit } = validClientSecretInfo;@@ -104,7 +110,7 @@ export const identityUaServiceFactory = ({}const identityAccessToken = await identityUaDAL.transaction(async (tx) => {- const uaClientSecretDoc = await identityUaClientSecretDAL.incrementUsage(validClientSecretInfo.id, tx);+ const uaClientSecretDoc = await identityUaClientSecretDAL.incrementUsage(validClientSecretInfo!.id, tx);const newToken = await identityAccessTokenDAL.create({identityId: identityUa.identityId,