summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2022-11-07 13:49:31 +0000
committerGitHub <noreply@github.com>2022-11-07 13:49:31 +0000
commite980982b59dea38ec10a5c58993d09e02f845d28 (patch)
tree8b6d68836ceca62fe6903f335a5340d7b89382b9 /synapse/api
parentBump types-jsonschema from 4.4.6 to 4.17.0.0 (#14386) (diff)
downloadsynapse-e980982b59dea38ec10a5c58993d09e02f845d28.tar.xz
Do not reject `/sync` requests with unrecognised filter fields (#14369)
For forward compatibility, Synapse needs to ignore fields it does not
recognise instead of raising an error.

Fixes #14365.

Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/filtering.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py

index 26be377d03..a9888381b4 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py
@@ -43,7 +43,7 @@ if TYPE_CHECKING: from synapse.server import HomeServer FILTER_SCHEMA = { - "additionalProperties": False, + "additionalProperties": True, # Allow new fields for forward compatibility "type": "object", "properties": { "limit": {"type": "number"}, @@ -63,7 +63,7 @@ FILTER_SCHEMA = { } ROOM_FILTER_SCHEMA = { - "additionalProperties": False, + "additionalProperties": True, # Allow new fields for forward compatibility "type": "object", "properties": { "not_rooms": {"$ref": "#/definitions/room_id_array"}, @@ -77,7 +77,7 @@ ROOM_FILTER_SCHEMA = { } ROOM_EVENT_FILTER_SCHEMA = { - "additionalProperties": False, + "additionalProperties": True, # Allow new fields for forward compatibility "type": "object", "properties": { "limit": {"type": "number"}, @@ -143,7 +143,7 @@ USER_FILTER_SCHEMA = { }, }, }, - "additionalProperties": False, + "additionalProperties": True, # Allow new fields for forward compatibility }