mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-30 14:01:42 +01:00
Fix being able to bypass e-mail restrictions
This commit is contained in:
parent
93a6c143af
commit
ec1bb2a4fe
@ -86,11 +86,11 @@ class User < ApplicationRecord
|
||||
validates :invite_request, presence: true, on: :create, if: :invite_text_required?
|
||||
|
||||
validates :locale, inclusion: I18n.available_locales.map(&:to_s), if: :locale?
|
||||
validates_with BlacklistedEmailValidator, on: :create
|
||||
validates_with BlacklistedEmailValidator, if: -> { !confirmed? }
|
||||
validates_with EmailMxValidator, if: :validate_email_dns?
|
||||
validates :agreement, acceptance: { allow_nil: false, accept: [true, 'true', '1'] }, on: :create
|
||||
|
||||
# Those are honeypot/antispam fields
|
||||
# Honeypot/anti-spam fields
|
||||
attr_accessor :registration_form_time, :website, :confirm_password
|
||||
|
||||
validates_with RegistrationFormTimeValidator, on: :create
|
||||
|
Loading…
x
Reference in New Issue
Block a user