Skip to content

Commit

Permalink
Increase max invite expiry to 30 days
Browse files Browse the repository at this point in the history
  • Loading branch information
TimCsaky committed May 28, 2024
1 parent 85608fb commit 9f7d1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/controllers/invite.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`;
Expand Down

0 comments on commit 9f7d1d4

Please sign in to comment.