-
- Downloads
olm: Allow decryption functions to define how to handle unicode decode errors.
This patch changes the decryption functions not to fail if there was an unicode decode error while converting the decrypted bytes plaintext into a native python string. Characters that cannot be decoded as unicode are now replaced with the unicode replacement character (U+FFFD). The old behaviour of raising an UnicodeDecodeError can be achieved by passing the "strict" error handling scheme to the decrypt function.
Showing
- python/olm/group_session.py 14 additions, 7 deletionspython/olm/group_session.py
- python/olm/pk.py 11 additions, 4 deletionspython/olm/pk.py
- python/olm/sas.py 2 additions, 2 deletionspython/olm/sas.py
- python/olm/session.py 15 additions, 6 deletionspython/olm/session.py
- python/olm/utility.py 1 addition, 0 deletionspython/olm/utility.py
- python/tests/group_session_test.py 17 additions, 0 deletionspython/tests/group_session_test.py
- python/tests/pk_test.py 10 additions, 0 deletionspython/tests/pk_test.py
- python/tests/session_test.py 11 additions, 0 deletionspython/tests/session_test.py
Loading
Please register or sign in to comment