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
optimised import
Joel Biddle61e44e152c24
diff --git a/frontend/src/components/utilities/checks/checkIsPasswordBreached.ts b/frontend/src/components/utilities/checks/checkIsPasswordBreached.tsindex 56b70c5c1c..75caf9dcf9 100644--- a/frontend/src/components/utilities/checks/checkIsPasswordBreached.ts+++ b/frontend/src/components/utilities/checks/checkIsPasswordBreached.ts@@ -1,5 +1,5 @@import axios from "axios";-import crypto from "crypto"; // added types from @types/node+import { createHash } from "crypto"; // added types from @types/nodeexport const checkIsPasswordBreached = async (password: string) => {// see API details here: https://haveibeenpwned.com/API/v3#SearchingPwnedPasswordsByRange@@ -14,7 +14,7 @@ export const checkIsPasswordBreached = async (password: string) => {try {const textEncoder = new TextEncoder();const encodedPwd = textEncoder.encode(password);- const hash = crypto.createHash("sha1").update(encodedPwd).digest();+ const hash = createHash("sha1").update(encodedPwd).digest();const hashedPwd = Array.from(new Uint8Array(hash)).map((byte) => byte.toString(16).padStart(2, "0"))