Fix handling of unicode in Active Directory group names.

Review Request #6959 — Created Feb. 17, 2015 and submitted

Information

Review Board
release-2.0.x
435177c...

Reviewers

Our checking for the "required group" in the AD authentication backend wasn't
correct in its handling of unicode. In the event that the required group had a
non-ASCII character, we'd crash while trying to split the groups.

I've changed it so that the text coming from AD is split using bytes instead of
unicode strings, which should avoid any implicit coercion. I've also fixed the
check to make sure we encode the required group to bytes before checking it
against the array of bytes objects.

Ran unit tests.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/accounts/backends.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/accounts/backends.py
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (becc0fe)
Loading...