• 
      

    Fixed string type issues in the security checks.

    Review Request #10660 — Created Aug. 15, 2019 and submitted

    Information

    Review Board
    release-4.0.x
    8b40c11...

    Reviewers

    The security checks logic was mixing byte and Unicode strings, resulting
    in the server executable file test always failing on Python 3. There
    were two parts that were broken:

    1. We were passing Unicode strings to zlib.compress(), instead of byte
      strings.

    2. We were reading file attachment data back from storage as a Unicode
      string and then potentially comparing against a byte string.

    We now assert that all test data are byte strings, pass the right type
    to zlib.compress(), and read the data back from storage as a byte
    string, ensuring we're using the same string type everywhere.

    Tested the Security Checks page on Python 2.7 and 3.7.

    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.0.x (3a566c1)