Fix #4418: Can't migrate mail addresses when email_domain_verification_list is nil.
Don't perform email domain verification if email_domain_verification_list is nil or empty.
This commit is contained in:
@@ -81,8 +81,9 @@ module EmailValidator
|
|||||||
end
|
end
|
||||||
|
|
||||||
def nondisposable?(address)
|
def nondisposable?(address)
|
||||||
|
return true if Danbooru.config.email_domain_verification_list.blank?
|
||||||
domain = Mail::Address.new(address).domain
|
domain = Mail::Address.new(address).domain
|
||||||
domain.in?(Danbooru.config.email_domain_verification_list)
|
domain.in?(Danbooru.config.email_domain_verification_list.to_a)
|
||||||
end
|
end
|
||||||
|
|
||||||
def undeliverable?(to_address, from_address: Danbooru.config.contact_email, timeout: 3)
|
def undeliverable?(to_address, from_address: Danbooru.config.contact_email, timeout: 3)
|
||||||
|
|||||||
@@ -519,11 +519,17 @@ module Danbooru
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
# A list of email domains that are used for account verification purposes.
|
# The whitelist of email domains allowed for account verification purposes.
|
||||||
# If a user signs up from a proxy they will need to verify their account
|
# If a user signs up from a proxy, they must verify their account using an
|
||||||
# using an email address from one of the domains on this list.
|
# email address from one of the domains on this list before they can do
|
||||||
|
# anything on the site. This is meant to prevent users from using
|
||||||
|
# disposable emails to create sockpuppet accounts.
|
||||||
|
#
|
||||||
|
# If this list is empty or nil, then there are no restrictions on which
|
||||||
|
# email domains can be used to verify accounts.
|
||||||
def email_domain_verification_list
|
def email_domain_verification_list
|
||||||
# ["gmail.com", "outlook.com", "yahoo.com"]
|
# ["gmail.com", "outlook.com", "yahoo.com"]
|
||||||
|
[]
|
||||||
end
|
end
|
||||||
|
|
||||||
# API key for Google Maps. Used for embedding maps on IP address lookup pages.
|
# API key for Google Maps. Used for embedding maps on IP address lookup pages.
|
||||||
|
|||||||
Reference in New Issue
Block a user