mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 17:16:08 -04:00
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>
This commit is contained in:
parent
233fc6e279
commit
e980982b59
3 changed files with 24 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue