forked-synapse/synapse
Richard van der Hoff cc33d9eee2
Check auth on received events' auth_events (#11001)
Currently, when we receive an event whose auth_events differ from those we expect, we state-resolve between the two state sets, and check that the event passes auth based on the resolved state.

This means that it's possible for us to accept events which don't pass auth at their declared auth_events (or where the auth events themselves were rejected), leading to problems down the line like #10083.

This change means we will:

 * ignore any events where we cannot find the auth events
 * reject any events whose auth events were rejected
 * reject any events which do not pass auth at their declared auth_events.

Together with a whole raft of previous work, this is a partial fix to #9595.

Fixes #6643.

Based on #11009.
2021-10-18 18:29:37 +01:00
..
_scripts Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
api Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
app Fix broken export-data admin command and add a test for it to CI (#11078) 2021-10-18 08:14:12 -07:00
appservice Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
config Move experimental & retention config out of the server module. (#11070) 2021-10-15 14:30:48 +00:00
crypto Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
events Move experimental & retention config out of the server module. (#11070) 2021-10-15 14:30:48 +00:00
federation Strip "join_authorised_via_users_server" from join events which do not need it. (#10933) 2021-10-01 11:39:17 -04:00
groups Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
handlers Check auth on received events' auth_events (#11001) 2021-10-18 18:29:37 +01:00
http Relax ignore-missing-imports for modules that have stubs now and update mypy (#11006) 2021-10-08 14:49:41 +01:00
logging Stop user directory from failing if it encounters users not in the users table. (#11053) 2021-10-13 09:38:22 +00:00
metrics Relax ignore-missing-imports for modules that have stubs now and update mypy (#11006) 2021-10-08 14:49:41 +01:00
module_api Port the Password Auth Providers module interface to the new generic interface (#10548) 2021-10-13 11:21:52 +00:00
push disallow-untyped-defs for synapse.push (#11023) 2021-10-11 17:42:10 +01:00
replication Fix logging context warnings when losing replication connection (#10984) 2021-10-15 13:10:58 +01:00
res Allow configuration of the oEmbed URLs. (#10714) 2021-08-31 18:37:07 -04:00
rest Ensure each charset is attempted only once during media preview. (#11089) 2021-10-14 18:51:44 +00:00
server_notices disallow-untyped-defs for synapse.server_notices (#11021) 2021-10-07 19:55:15 +01:00
spam_checker_api Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state Check *all* auth events for room id and rejection (#11009) 2021-10-18 18:28:30 +01:00
static Display an error page during failure of fallback UIA. (#10561) 2021-08-18 08:13:35 -04:00
storage _run_push_actions_and_persist_event: handle no min_depth (#11014) 2021-10-18 17:17:15 +01:00
streams Remove unnecessary parentheses around tuples returned from methods (#10889) 2021-09-23 11:59:07 +01:00
util Relax ignore-missing-imports for modules that have stubs now and update mypy (#11006) 2021-10-08 14:49:41 +01:00
__init__.py 1.45.0rc2 2021-10-14 10:59:27 +01:00
event_auth.py Check *all* auth events for room id and rejection (#11009) 2021-10-18 18:28:30 +01:00
notifier.py Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
python_dependencies.py Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
server.py Port the Password Auth Providers module interface to the new generic interface (#10548) 2021-10-13 11:21:52 +00:00
types.py Remove unnecessary parentheses around tuples returned from methods (#10889) 2021-09-23 11:59:07 +01:00
visibility.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00