Make password encryption correctly handle non-ASCII strings.

Review Request #8453 — Created Oct. 11, 2016 and submitted

Information

Review Board
release-2.0.x
d89dea6...

Reviewers

It's rare for people to use non-ASCII passwords, but it does happen in some
cases. Most of our code deals with this correctly, but the password encryption
and decryption would fail. This change adds the necessary encode/decode steps.
If someone is using non-ASCII passwords with an encoding other than utf-8
they're out of luck.

  • Connected an SVN repository using a password containing unicode. Before this
    change, saving the form would fail. After, it works. I also checked the
    contents of the form field after saving it to verify that we were pulling the
    password back out correctly. I was also able to create a post-commit review
    request using this repository.
  • Ran unit tests.
Description From Last Updated

Are there exceptions we might want to check for and log here and below?

chipx86chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/scmtools/models.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/scmtools/models.py
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. reviewboard/scmtools/models.py (Diff revision 1)
     
     
     

    Are there exceptions we might want to check for and log here and below?

    1. I don't think so. It's possible if there are weird charset issues, but those should fail before we get to this point.

  3. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

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