diff --git a/changelog.d/14369.bugfix b/changelog.d/14369.bugfix new file mode 100644 index 000000000000..e6709f4eecda --- /dev/null +++ b/changelog.d/14369.bugfix @@ -0,0 +1 @@ +Fix a long-standing bug where Synapse would raise an error when encountering an unrecognised field in a `/sync` filter, instead of ignoring it for forward compatibility. diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py index 26be377d0334..7cd4b2df611c 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py @@ -43,7 +43,7 @@ from synapse.server import HomeServer FILTER_SCHEMA = { - "additionalProperties": False, + "additionalProperties": True, "type": "object", "properties": { "limit": {"type": "number"}, @@ -63,7 +63,7 @@ } ROOM_FILTER_SCHEMA = { - "additionalProperties": False, + "additionalProperties": True, "type": "object", "properties": { "not_rooms": {"$ref": "#/definitions/room_id_array"}, @@ -77,7 +77,7 @@ } ROOM_EVENT_FILTER_SCHEMA = { - "additionalProperties": False, + "additionalProperties": True, "type": "object", "properties": { "limit": {"type": "number"}, @@ -143,7 +143,7 @@ }, }, }, - "additionalProperties": False, + "additionalProperties": True, }