-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Description
Just saw this error on the server (actual email censored, but it contains undrescores):
Traceback (most recent call last):
File "/home/qiita/.virtualenvs/qiita/lib/python2.7/site-packages/tornado/web.py", line 1141, in _when_complete
callback()
File "/home/qiita/.virtualenvs/qiita/lib/python2.7/site-packages/tornado/web.py", line 1162, in _execute_method
self._when_complete(method(*self.path_args, **self.path_kwargs),
File "/home/qiita/qiita_main/qiita_pet/handlers/auth_handlers.py", line 39, in post
created = User.create(username, password, info)
File "/home/qiita/qiita_main/qiita_db/user.py", line 196, in create
raise IncorrectEmailError("Bad email given: %s" % email)
IncorrectEmailError: Bad email given: email_with_underscores@hotmail.com
This is because of User.validate_email, which disallows underscores, even though they should be allowed.
Additionally, line 487
return True if match(pattern, email) is not None else Falsecan be simplified to
return match(pattern, email) is not None