Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat(verify): limit verification token to 20 mins
Marc Seitz8f9ff0b6377e
diff --git a/pages/api/views-dataroom.ts b/pages/api/views-dataroom.tsindex ea55474a..d4d5bdcd 100644--- a/pages/api/views-dataroom.ts+++ b/pages/api/views-dataroom.ts@@ -157,7 +157,7 @@ export default async function handle(if (link.emailAuthenticated && !token && !dataroomVerified) {const token = newId("email");const expiresAt = new Date();- expiresAt.setHours(expiresAt.getHours() + 1); // token expires in 1 hour+ expiresAt.setMinutes(expiresAt.getMinutes() + 20); // token expires in 20 minutesawait prisma.verificationToken.create({data: {diff --git a/pages/api/views.ts b/pages/api/views.tsindex 90a1ac41..e9c55a17 100644--- a/pages/api/views.ts+++ b/pages/api/views.ts@@ -143,7 +143,7 @@ export default async function handle(if (link.emailAuthenticated && !token) {const token = newId("email");const expiresAt = new Date();- expiresAt.setHours(expiresAt.getHours() + 1); // token expires in 1 hour+ expiresAt.setMinutes(expiresAt.getMinutes() + 20); // token expires in 20 minutesawait prisma.verificationToken.create({data: {