synapse-product/synapse/events
David Robertson a134e626e4
Reject boolean power levels (#14944)
* Better test for bad values in power levels events

The previous test only checked that Synapse didn't raise an exception,
but didn't check that we had correctly interpreted the value of the
dodgy power level.

It also conflated two things: bad room notification levels, and bad user
levels. There _is_ logic for converting the latter to integers, but we
should test it separately.

* Check we ignore types that don't convert to int

* Handle `None` values in `notifications.room`

* Changelog

* Also test that bad values are rejected by event auth

* Docstring

* linter scripttttttttt

* Test boolean values in PL content

* Reject boolean power levels

* Changelog
2023-01-31 10:57:02 +00:00
..
__init__.py Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
builder.py Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00
presence_router.py Implement cancellation support/protection for module callbacks (#12568) 2022-05-09 12:31:14 +01:00
snapshot.py Move StateFilter to synapse.types (#14668) 2022-12-12 16:19:30 +00:00
spamcheck.py Instrument _check_sigs_and_hash_and_fetch to trace time spent in child concurrent calls (#13588) 2022-08-23 21:53:37 -05:00
third_party_rules.py Make _get_state_map_for_room not break when room state events don't contain an event id. (#13174) 2022-07-07 08:14:32 +00:00
utils.py Reject boolean power levels (#14944) 2023-01-31 10:57:02 +00:00
validator.py Prefer type(x) is int to isinstance(x, int) (#14945) 2023-01-31 10:33:07 +00:00