Commit Graph

15 Commits (d7ab5655efde24fd73f9ad4cd6c763852a7004f8)

Author SHA1 Message Date
Claire 6ad0fb5a77
Fix NULL MX handling and tighten DNS resolving specs ()
Matt Jankowski 88d33f361f
Fix Lint/DuplicateBranch cop ()
Claire a5a00d7f7a
Fix email with empty domain name labels passing validation ()
* Fix email with empty domain name labels passing validation

`EmailMxValidator` would allow empty labels because `Resolv::DNS` is
particularly lenient about them, but the email would be invalid and
unusable.

* Add tests
Eugen Rochko f6d35ed57d
Remove IP matching from e-mail domain blocks ()
Clear out e-mail domain blocks created from automatically resolved DNS records
Eugen Rochko a29a982eaa
Change e-mail domain blocks to block IPs dynamically ()
* Change e-mail domain blocks to block IPs dynamically

* Update app/workers/scheduler/email_domain_block_refresh_scheduler.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

* Update app/workers/scheduler/email_domain_block_refresh_scheduler.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
Claire 051efed5ed
Bypass MX validation for explicitly allowed domains ()
* Bypass MX validation for explicitly allowed domains

This spares some lookups and prevent issues in some edge cases with
local domains.

* Add tests

* Fix test
Eugen Rochko 9aa37b32c3
Add `details` to error response for `POST /api/v1/accounts` in REST API ()
ThibG 8d217d7231
Improve email address validation ()
* Increase DNS timeout from 1 second to 5 seconds for MX check

1 seconds is rather short when using a recursive DNS resolver which
hasn't got a cached result already available. Use 5 seconds instead,
which is the timeout value we use for outgoing HTTP queries.

* Add more precise error messages for invalid e-mail addresses
Eugen Rochko bfca58d137
Fix encoding error when checking e-mail MX records ()
Franck Zoccolo 4f0322dcae Add support for IPv6 only MXes in Email validation ()
* Add support for IPv6 only MXes

* Fixed email validator tests
Eugen Rochko dbb1ee269f
Improve e-mail MX validator and add tests ()
abcang 9ad334f65c Call address instead of exchange ()
Eugen Rochko 32a4b524fb
In e-mail validator, fallback from MX to A record ()
Fix 
takayamaki 03f4c214b4 fix: Don't validate MX record in development ()
Eugen Rochko 63c7b91572 Validate that e-mail resolves with MX and it's not blacklisted ()
Original patch by @j-a4