Commit Graph

12 Commits

Author SHA1 Message Date
evazion
751835745b emails: fix email validation regex.
Fix the email validation regex allowing certain invalid emails like `foo@gmail..com`.
2022-01-02 16:08:35 -06:00
evazion
a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00
evazion
15657aad6d emails: update email domain whitelist. 2021-12-02 20:49:20 -06:00
evazion
28edd5a22a emails: hardcode nondisposable email list.
Hardcode the list of nondisposable email providers instead of making it
a config option. Also add a few new providers.

This was previously a config option to keep it secret, but there's not
much need for secrecy here.

A Restricted user's email must be on this list to unrestrict their
account. If a user is Restricted and their email is not in this list,
then it's assumed to be disposable and can't be used to unrestrict their
account even if they verify their email address.
2021-09-06 03:24:53 -05:00
evazion
19f01d4554 emails: update canonical domains list. 2021-09-05 17:56:24 -05:00
evazion
ed302fdf4d docs: add documentation for various classes in app/logical. 2021-06-23 06:23:29 -05:00
evazion
dbe2eeb00d emails: remove "Valid?" search option.
No longer necessary after running previous commit because all invalid
email addresses have been purged.
2021-01-02 04:09:43 -06:00
evazion
7fc5845e72 /emails: add more search options.
Add options to search for invalid emails and emails from restricted
domains.
2020-12-28 19:31:40 -06:00
evazion
5bbaa3bdf0 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.
2020-04-21 00:47:41 -05:00
evazion
cbfa8c4904 email validator: fix undeliverable? method always returning false.
`undeliverable?` calls `smtp_enabled?` which we forgot to define. It
swallowed the error so it didn't fail but it always returned false.
2020-03-27 12:47:35 -05:00
evazion
b7bd6c8fdd users: require email verification for signups from proxies.
Require users who signup using proxies to verify their email addresses
before they can perform any edits. For verification purposes, the email
must be a nondisposable address from a whitelist of trusted email
providers.
2020-03-24 17:25:35 -05:00
evazion
e79910431f emails: validate that email addresses are deliverable.
Reject email addresses that known to be undeliverable during signup.
Some users signup with invalid email addresses, which causes the welcome
email (which contains the email confirmation link) to bounce. Too many
bounces hurt our ability to send mail.

We check that an email address is undeliverable by checking if the
domain has a mail server and if the server returns an invalid address
error when attempting to send mail. This isn't foolproof since some
servers don't return an error if the address doesn't exist. If the
checks fail we know the address is bad, but if the checks pass that
doesn't guarantee the address is good. However, this is still good
enough to filter out bad addresses for popular providers like Gmail and
Microsoft that do return nonexistent address errors.

The address existence check requires being able to connect to mail
servers over port 25. This may fail if your network blocks port 25,
which many home ISPs and hosting providers do by default.
2020-03-23 23:45:18 -05:00