diff --git a/Node/node.py b/Node/node.py index 070394b..2cd4fb8 100644 --- a/Node/node.py +++ b/Node/node.py @@ -1180,7 +1180,8 @@ async def incoming(websocket, path): ciphertext, tag, nonce = base64.b64decode(ciphertext.encode("utf-8")), base64.b64decode(tag.encode("utf-8")), base64.b64decode(nonce.encode("utf-8")) cipher_aes = AES.new(session_key, AES.MODE_GCM, nonce) plaintext = cipher_aes.decrypt_and_verify(ciphertext, tag) - data = plaintext.decode("ascii", errors="ignore") + data = plaintext.decode("utf-8") + data = ''.join(c for c in data if c.isprintable()) logging.debug(repr(data)) except Exception as e: