Don't about JSON when warning about content tampering

This commit is contained in:
Erik Johnston 2015-06-02 14:26:54 +01:00
parent 09e23334de
commit 22716774d5
1 changed files with 4 additions and 7 deletions

View File

@ -18,8 +18,6 @@ from twisted.internet import defer
from synapse.events.utils import prune_event from synapse.events.utils import prune_event
from syutil.jsonutil import encode_canonical_json
from synapse.crypto.event_signing import check_event_content_hash from synapse.crypto.event_signing import check_event_content_hash
from synapse.api.errors import SynapseError from synapse.api.errors import SynapseError
@ -120,16 +118,15 @@ class FederationBase(object):
) )
except SynapseError: except SynapseError:
logger.warn( logger.warn(
"Signature check failed for %s redacted to %s", "Signature check failed for %s, redacting",
encode_canonical_json(pdu.get_pdu_json()), pdu.event_id,
encode_canonical_json(redacted_pdu_json),
) )
raise raise
if not check_event_content_hash(pdu): if not check_event_content_hash(pdu):
logger.warn( logger.warn(
"Event content has been tampered, redacting %s, %s", "Event content has been tampered, redacting.",
pdu.event_id, encode_canonical_json(pdu.get_dict()) pdu.event_id,
) )
defer.returnValue(redacted_event) defer.returnValue(redacted_event)