Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

use RegExp to test blacklisted emails

Steven Tey26708d0906ed
diff --git a/lib/utils.ts b/lib/utils.ts
index 319e07d05b..ec3b2ad286 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -355,7 +355,7 @@ export const isBlacklistedEmail = async (email: string) => {
} catch (e) {
blacklistedEmails = [];
}
- return new Set(blacklistedEmails).has(email);
+ return new RegExp(blacklistedEmails.join("|"), "i").test(email);
};
export const isReservedKey = async (key: string) => {