Add a content security policy and expire mailed export links.
Responses had no CSP, the 48-hour download token never changed, and short share slugs could be guessed without a miss limit.
This commit is contained in:
1 parent
0fe2624002
commit
75649a9a42
18 files changed
+249
-19
No files matched your search
@@ -46,6 +46,7 @@ export async function sendDueRuleFollowUpEmails(
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
exportTokenVersion: true,
|
||||
user: { select: { email: true } },
|
||||
},
|
||||
});
|
||||
@@ -66,7 +67,7 @@ export async function sendDueRuleFollowUpEmails(
|
||||
continue;
|
||||
}
|
||||
|
||||
const token = ruleExportToken(row.id, pepper);
|
||||
const token = ruleExportToken(row.id, pepper, row.exportTokenVersion);
|
||||
try {
|
||||
await sendRuleFollowUpEmail({
|
||||
to: email,
|
||||
|
||||
Reference in new issue
Block a user