From f8a287caa0a953bba3bdab875582586b8bb7b6ce Mon Sep 17 00:00:00 2001 From: Anna-Maria Meriniemi Date: Sat, 27 Jan 2018 01:55:35 +0200 Subject: [PATCH] Improve and tidy up email blacklist regexes (Hotmail) (#438) Because reading warnings is overrated. This does not fix people using custom domains, but it's more likely they'll know what's up when their email is thrown into the void. Fixes #437. --- config.example.py | 7 +++++-- nyaa/templates/register.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config.example.py b/config.example.py index f86434a..844c0e8 100644 --- a/config.example.py +++ b/config.example.py @@ -52,8 +52,11 @@ ALLOW_PASSWORD_RESET = True EMAIL_BLACKLIST = ( # Hotmail completely rejects "untrusted" emails, # so it's less of a headache to blacklist them as users can't receive the mails anyway. - re.compile(r'(?i)@((hotmail|live|msn|outlook|passport)\.com|passport\.net)'), - re.compile(r'(?i)@outlook\.(at|be|cl|co\.(id|il|nz|th)|com\.(ar|au|br|gr|pe|tr|vn)|cz|de|dk|es|fr|hu|ie|in|it|jp|kr|lv|my|ph|pt|sa|sg|sk)'), + # (Hopefully) complete list of Microsoft email domains follows: + re.compile(r'(?i)@hotmail\.(co|co\.uk|com|de|dk|eu|fr|it|net|org|se)'), + re.compile(r'(?i)@live\.(co|co.uk|com|de|dk|eu|fr|it|net|org|se)'), + re.compile(r'(?i)@outlook\.(at|be|cl|co|co\.(id|il|nz|th)|com|com\.(ar|au|au|br|gr|pe|tr|vn)|cz|de|de|dk|dk|es|eu|fr|fr|hu|ie|in|it|it|jp|kr|lv|my|org|ph|pt|sa|se|sg|sk)'), + re.compile(r'(?i)@(msn\.com|passport\.(com|net))'), # '@dodgydomain.tk' ) diff --git a/nyaa/templates/register.html b/nyaa/templates/register.html index 4bc89ad..f1bc7ed 100644 --- a/nyaa/templates/register.html +++ b/nyaa/templates/register.html @@ -7,7 +7,7 @@ {% from "_formhelpers.html" import render_field %}

Register

-

Important: Do not use Outlook (Hotmail) email addresses, they discard our verification email without sending it to spam. No support is offered if you ignore this warning.

+

Important: Do not use Outlook (Hotmail/Live/MSN) email addresses, they discard our verification email without sending it to spam. No support is offered if you ignore this warning.

{{ form.csrf_token }}