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.

revert

Steven Tey5755c3f52e9f
diff --git a/apps/web/lib/zod/schemas/oauth.ts b/apps/web/lib/zod/schemas/oauth.ts
index 5faae72fec..5f03520bbb 100644
--- a/apps/web/lib/zod/schemas/oauth.ts
+++ b/apps/web/lib/zod/schemas/oauth.ts
@@ -49,13 +49,9 @@ export const authorizeRequestSchema = z.object({
.string()
.nullable()
.transform((scope) => {
- // decode the scope parameter and split by comma or space
+ // split by comma or space or plus sign
const scopes = [
- ...new Set(
- decodeURIComponent(scope ?? "")
- .split(/[,\s]/)
- .filter(Boolean),
- ),
+ ...new Set((scope ?? "").split(/[,\s+]/).filter(Boolean)),
];
if (!scopes.includes("user.read")) {