Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit dd7f825

Browse files
author
David Robertson
authored
Fix losing incoming EDUs if debug logging enabled (#11890)
* Fix losing incoming EDUs if debug logging enabled Fixes #11889. Homeservers should only be affected if the `synapse.8631_debug` logger was enabled for DEBUG mode. I am not sure if this merits a bugfix release: I think the logging can be disabled in config if anyone is affected? But it is still pretty bad.
1 parent 23a698f commit dd7f825

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changelog.d/11890.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug introduced in Synapse 1.51.0rc1 where incoming federation transactions containing at least one EDU would be dropped if debug logging was enabled for `synapse.8631_debug`.

synapse/federation/transport/server/federation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ async def on_PUT(
109109
)
110110

111111
if issue_8631_logger.isEnabledFor(logging.DEBUG):
112-
DEVICE_UPDATE_EDUS = {"m.device_list_update", "m.signing_key_update"}
112+
DEVICE_UPDATE_EDUS = ["m.device_list_update", "m.signing_key_update"]
113113
device_list_updates = [
114114
edu.content
115115
for edu in transaction_data.get("edus", [])
116-
if edu.edu_type in DEVICE_UPDATE_EDUS
116+
if edu.get("edu_type") in DEVICE_UPDATE_EDUS
117117
]
118118
if device_list_updates:
119119
issue_8631_logger.debug(

0 commit comments

Comments
 (0)