Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix

Marc Seitz382d01c721d3
diff --git a/pages/api/links/download/file/[jobId]/[partIndex].ts b/pages/api/links/download/file/[jobId]/[partIndex].ts
index fc923fcd..a2bfb4b0 100644
--- a/pages/api/links/download/file/[jobId]/[partIndex].ts
+++ b/pages/api/links/download/file/[jobId]/[partIndex].ts
@@ -39,7 +39,11 @@ export default async function handler(
.json({ error: "Download job not found or expired" });
}
- if (job.linkId !== linkId || job.viewerEmail !== view.viewerEmail) {
+ if (
+ job.linkId !== linkId ||
+ job.viewerEmail?.toLowerCase().trim() !==
+ view.viewerEmail?.toLowerCase().trim()
+ ) {
return res.status(403).json({ error: "Job does not belong to this viewer" });
}