Skip to content

Commit

Permalink
fix: added arbitrary stripe block
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Nov 8, 2024
1 parent f2a18c4 commit d7b1d98
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ Users.pre('validate', async function (next) {
// Plan expires at should get updated everytime the user is saved
Users.pre('save', async function (next) {
const user = this;

// arbitrary block due to stripe spam unresolved in november 2024
if (typeof user.email === 'string' && user.email.startsWith('hbrzi'))
return next(new Error('Try again later'));

// If user has a paid plan then consider their email verified
if (user.plan !== 'free') user[config.userFields.hasVerifiedEmail] = true;

Expand Down

0 comments on commit d7b1d98

Please sign in to comment.