• 
      

    Post-process usernames from LDAP/AD before getting/creating User objects.

    Review Request #5406 — Created Feb. 5, 2014 and submitted

    Information

    Review Board
    master

    Reviewers

    Post-process usernames from LDAP/AD before getting/creating User objects.

    LDAP and AD usernames have basically no rules, while django usernames have lots
    of rules. This change makes it so people log in using the username that they
    normally have, but the username stored in Review Board will have all the junk
    stripped out.

    This fixes numerous issues that people have encountered, such as:
    - Case insensitivity would cause multiple users to be created in Review Board
    - Usernames with spaces or special characters would cause URL resolution and
    form validation failures, since the db backend didn't enforce the rules but
    our URL regexes and form fields did.

    Ran unit tests.

    chipx86
    1. Looks good.

      There may be cases where users are using a funky username in Django and will have trouble. Mostly thinking about the case normalization.

      1. The normalization only happens inside the backends after authenticating. I suppose it's possible that the normalization could cause two users to map to the same username, but there's no good answer there.

    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (fc95975).