From ac03711574f18d82fe92b0eaf5f3391d054b96f2 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 2 Nov 2021 22:16:06 +0200 Subject: [PATCH] feat(phisherman): assume master API key is always valid --- backend/src/data/Phisherman.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/data/Phisherman.ts b/backend/src/data/Phisherman.ts index 44fe3fa5..24073bd8 100644 --- a/backend/src/data/Phisherman.ts +++ b/backend/src/data/Phisherman.ts @@ -184,6 +184,10 @@ export async function getPhishermanDomainInfo(domain: string): Promise { + if (apiKey === MASTER_API_KEY) { + return true; + } + const keyCache = getKeyCacheRepository(); const hash = crypto.createHash("sha256").update(apiKey).digest("hex"); const entry = await keyCache.findOne({ hash });