Fix problems in hardened password storage.

Review Request #6495 — Created Oct. 23, 2014 and submitted

Information

Review Board
release-2.0.x
6a05f47...

Reviewers

The password storage had a couple of bugs when saving empty passwords.

If a password was not set, but we tried to store it, we'd get '\tNone'.
This was due to always prefixing with the encrypted password marker, but
not actually encrypting the string. This would then break when we went
to load it, since 'None' wasn't an encrypted password.

We have to work around the loading, so we now check for '\tNone'. Sucks,
but now necessary. Down the road, perhaps we can convert any that are
busted during upgrade.

Storage has been fixed to serialize None values correctly.

Saved without this fix, and got a broken value of "\tNone". This matched
the report we received today.

Was able to load again after the loading fix. Saw that the password was
correctly returned as None.

Saved an empty password after the fix. Saw it was stored empty in the
database.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/scmtools/models.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/scmtools/models.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (60d34a0)
Loading...