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

JSONSchema Validation For Filters #1783

Merged
merged 4 commits into from Mar 23, 2017

Conversation

pik
Copy link
Contributor

@pik pik commented Jan 8, 2017

  • Errors are now raised for invalid filter properties
  • Easier to test / human-readable (compared to the for-loops from before)
  • Adds invalid filter tests

Also the that the room_event_filter schema supplied by the spec does not actually function in all cases e.g. ##1782 - should probably be addressed, adding test cases and either by adding the missing functionality or limiting the schema.

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

2 similar comments
@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@matrixbot
Copy link
Member

Can one of the admins verify this patch?

"timeline": {
"$ref": "#/definitions/room_event_filter"
},
"accpount_data": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo accpount_data

@pik pik force-pushed the filter-validation branch 5 times, most recently from 918a9d9 to 41cc3da Compare March 8, 2017 13:08
@erikjohnston
Copy link
Member

looks good to me, just requires a rebase

@erikjohnston
Copy link
Member

@matrixbot ok to test

pik added 4 commits March 23, 2017 11:42
 * add invalid filter tests

Signed-off-by: pik <alexander.maznev@gmail.com>
Signed-off-by: pik <alexander.maznev@gmail.com>
 * use a valid filter in rest/client/v2_alpha test

Signed-off-by: pik <alexander.maznev@gmail.com>
Signed-off-by: pik <alexander.maznev@gmail.com>
@erikjohnston
Copy link
Member

Thanks!

@erikjohnston erikjohnston merged commit 6af0096 into matrix-org:develop Mar 23, 2017
richvdh added a commit that referenced this pull request Oct 24, 2018
Fixes a bug introduced in #1783 which
meant that single backslashes were not allowed in event field filters.

The intention here is to allow single-backslashes, but disallow
double-backslashes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants