mirror of
https://github.com/neocities/neocities.git
synced 2025-07-19 17:16:05 +02:00
enforce disposable email policy on email verifications / changes
This commit is contained in:
parent
2e5cc9b243
commit
0e3b6ee3a0
2 changed files with 4 additions and 1 deletions
|
@ -912,7 +912,7 @@ class Site < Sequel::Model
|
|||
errors.add :email, 'Cannot use this email address.'
|
||||
end
|
||||
|
||||
if parent? && new? && self.class.disposable_email?(values[:email])
|
||||
if parent? && (values[:created_at].nil? || values[:created_at] > 1.week.ago) && self.class.disposable_email?(values[:email])
|
||||
errors.add :email, 'Cannot use a disposable email address.'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue