diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-02-13 23:11:49 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-02-13 23:20:04 +0100 |
commit | 53280164e2ebb5856a6f25d14f27439855f99dbb (patch) | |
tree | f470ed585855f7ad83fdb5afc08ad2cd673b4be6 /mediagoblin/auth/views.py | |
parent | e4c3077437042f5466c3f75c85c0d174c272a85a (diff) | |
download | mediagoblin-53280164e2ebb5856a6f25d14f27439855f99dbb.tar.lz mediagoblin-53280164e2ebb5856a6f25d14f27439855f99dbb.tar.xz mediagoblin-53280164e2ebb5856a6f25d14f27439855f99dbb.zip |
47: Only lowercase host part of email
According to most documentation it seems that the local
part of an email adress is/can be case sensitive. While
the host part is not.
So we lowercase only the host part of the given adress.
See: http://issues.mediagoblin.org/ticket/47
Diffstat (limited to 'mediagoblin/auth/views.py')
-rw-r--r-- | mediagoblin/auth/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 9af89c2a..e18469b9 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -60,7 +60,9 @@ def register(request): if request.method == 'POST' and register_form.validate(): # TODO: Make sure the user doesn't exist already username = unicode(request.POST['username'].lower()) - email = unicode(request.POST['email'].lower()) + em_user, em_dom = unicode(request.POST['email']).split("@", 1) + em_dom = em_dom.lower() + email = em_user + "@" + em_dom users_with_username = request.db.User.find( {'username': username}).count() users_with_email = request.db.User.find( |