diff --git a/website/views.py b/website/views.py index 570690e2f..cf6138bd7 100644 --- a/website/views.py +++ b/website/views.py @@ -791,8 +791,9 @@ def post(self, request, *args, **kwargs): exists = False domain = None if email: - domain = email.split("@")[-1] + domain = sanitize_domain(email.split("@")[-1]) try: + return HttpResponse("Invalid domain name.") ret = urllib.request.urlopen("https://" + sanitize_domain(domain) + "/favicon.ico") exists = ret.code == 200 except: