Skip to content

Commit 19ba796

Browse files
bruderjakob12threema-lenny
authored andcommitted
Update e2e.py
Preventing UnicodeDecodeError in case that Umlaute, etc. are in e.g., an images description.
1 parent 204ea9b commit 19ba796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

threema/gateway/e2e.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ async def pack(self, writer):
12971297
async def unpack(cls, connection, parameters, key_pair, reader):
12981298
# Get payload
12991299
try:
1300-
content = bytes(reader.readexactly(len(reader))).decode('ascii')
1300+
content = bytes(reader.readexactly(len(reader))).decode('utf-8')
13011301
except UnicodeError as exc:
13021302
raise MessageError('Could not decode JSON') from exc
13031303

0 commit comments

Comments
 (0)