1. 23 Apr, 2020 2 commits
    • Handle invalid unicode in metadata values. (#136) · bc4e0cdb
      * Handle invalid unicode in metadata values.
      
      In #135 it was brought up that you can crash the python interpreter if you have
      invalid unicode in a metadata value. This is my attempt to fix that by
      attempting to create a string, and if that fails falling back to a bytes object.
      On the weird chance that the bytes object fails to create I added a safety check
      so that we don't add a NULL ptr to the dictionary (this is how the crash was
      manifesting).
      
      It's debatable if we want to ONLY add strings as metadata, and NOT fallback to
      bytes. If we don't fall back to bytes the only other option I see is to silently
      drop that metadata on the floor. The tradeoff here is that now you may end up
      with a string or a bytes object in your metadata dictionary, which is less than
      ideal IMO.
      
      I'm open to suggestions on this one.
      
      Fixes #135
      
      * Add error handling to conversion to Unicode
      Metadata test accepts stripped or original characters
      
      * Remove 'or' clause from tests and add another NULL test check.
      
      Co-authored-by: malvidin <malvidin@gmail.com>
      Wesley Shields authored
  2. 21 Apr, 2020 1 commit
  3. 24 Mar, 2020 2 commits
  4. 07 Jan, 2020 6 commits
  5. 09 Dec, 2019 1 commit
  6. 20 Nov, 2019 1 commit
  7. 13 Nov, 2019 1 commit
  8. 10 Oct, 2019 3 commits
  9. 24 Sep, 2019 5 commits
  10. 02 May, 2019 6 commits
  11. 29 Apr, 2019 2 commits
  12. 26 Apr, 2019 1 commit
  13. 22 Feb, 2019 4 commits
  14. 17 Feb, 2019 1 commit
  15. 05 Dec, 2018 4 commits