From 9f7d1d48a91a4c47433bca65dc19034a18c93570 Mon Sep 17 00:00:00 2001 From: Csaky Date: Tue, 28 May 2024 11:08:11 -0700 Subject: [PATCH] Increase max invite expiry to 30 days --- app/src/controllers/invite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/controllers/invite.js b/app/src/controllers/invite.js index c9a74080..a79ff8cd 100644 --- a/app/src/controllers/invite.js +++ b/app/src/controllers/invite.js @@ -31,8 +31,8 @@ const controller = { let resource, type; try { - // Reject if expiresAt is more than 7 days away - const maxExpiresAt = Math.floor(Date.now() / 1000) + 691199; + // Reject if expiresAt is more than 30 days away + const maxExpiresAt = Math.floor(Date.now() / 1000) + 2592000; if (req.body.expiresAt && req.body.expiresAt > maxExpiresAt) { const limit = new Date(maxExpiresAt * 1000).toISOString(); const msg = `"expiresAt" must be less than "${limit}"`;