bpartridge/django-saml2-sp

Add an option to allow for case insensitive matching of username

Opened this issue · 0 comments

What steps will reproduce the problem?

1. create a user such as username foo.bar@test.com
2. login with SAML under auto_create and have the SAML provider return 
Foo.Bar@test.com
3. You will see that a second user is created and lots of things might go wrong 
in the password base authentication backend of the app if the authentication 
backend is customized to treat username as case insensitive (majority of django 
apps are probably like this!)

We need an option that would allow case insensitive lookup, e.g. 
Users.object.get_or_create(username__iexact=username) vs 
...get_or_create(username=username) ...

Original issue reported on code.google.com by ehs...@gmail.com on 12 Jun 2013 at 4:36