mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
update verifyHostInputValidity
This commit is contained in:
@@ -24,7 +24,7 @@ export const verifyHostInputValidity = (host: string, isGateway = false) => {
|
|||||||
if (
|
if (
|
||||||
host === "localhost" ||
|
host === "localhost" ||
|
||||||
host === "127.0.0.1" ||
|
host === "127.0.0.1" ||
|
||||||
crypto.timingSafeEqual(Buffer.from(dbHost || ""), Buffer.from(host))
|
(dbHost?.length === host.length && crypto.timingSafeEqual(Buffer.from(dbHost || ""), Buffer.from(host)))
|
||||||
) {
|
) {
|
||||||
throw new BadRequestError({ message: "Invalid db host" });
|
throw new BadRequestError({ message: "Invalid db host" });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user