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.

encodeURIComponent when storing URLs in Redis

Steven Tey9ffc677c56b1
diff --git a/lib/api/links.ts b/lib/api/links.ts
index 8e9761b66d..de102627ea 100644
--- a/lib/api/links.ts
+++ b/lib/api/links.ts
@@ -166,7 +166,7 @@ export async function addLink(link: LinkProps) {
redis.set(
`${domain}:${key}`,
{
- url,
+ url: encodeURIComponent(url),
password: hasPassword,
proxy,
ios,
@@ -256,7 +256,7 @@ export async function editLink(link: LinkProps, oldKey: string) {
redis.set(
`${domain}:${key}`,
{
- url,
+ url: encodeURIComponent(url),
password: hasPassword,
proxy,
ios,