Skip to content
Permalink
Browse files

[fix] omit message content from log output

Refs #2732 Problems sending messages with Unicode
  • Loading branch information...
tgalal committed May 8, 2019
1 parent 15e36f4 commit 749ac64a0f72109fc3cc94447a8433056b28b5e2
Showing with 8 additions and 2 deletions.
  1. +8 −2 yowsup/axolotl/manager.py
@@ -147,7 +147,10 @@ def _unpad(self, data):
return data[:-padding]

def encrypt(self, recipient_id, message):
logger.debug("encrypt(recipientid=%s, message=%s)" % (recipient_id, message))
# to avoid the hassle of encoding issues and associated unnecessary crashes,
# don't log the message content.
# see https://github.com/tgalal/yowsup/issues/2732
logger.debug("encrypt(recipientid=%s, message=[omitted])" % recipient_id)
"""
:param recipient_id:
:type recipient_id: str
@@ -200,7 +203,10 @@ def group_encrypt(self, groupid, message):
:return:
:rtype:
"""
logger.debug("group_encrypt(groupid=%s, message=%s)" % (groupid, message))
# to avoid the hassle of encoding issues and associated unnecessary crashes,
# don't log the message content.
# see https://github.com/tgalal/yowsup/issues/2732
logger.debug("group_encrypt(groupid=%s, message=[omitted])" % groupid)
group_cipher = self._get_group_cipher(groupid, self._username)
return group_cipher.encrypt(message + self._generate_random_padding())

0 comments on commit 749ac64

Please sign in to comment.
You can’t perform that action at this time.