The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix: special characters bypassing link validation
Christo Todorovcefcc162ec1d
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.tsindex 27f5cd7cf6..6ea9dc19b2 100644--- a/apps/web/lib/api/links.ts+++ b/apps/web/lib/api/links.ts@@ -252,6 +252,8 @@ export function processKey(key: string) {}// remove all leading and trailing slashes from keykey = key.replace(/^\/+|\/+$/g, "");+ // replace all special characters+ key = key.normalize('NFD').replace(/[\u0300-\u036f]/g, '');if (key.length === 0) {return null;}