summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-07-17 16:52:02 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-07-18 14:45:55 +0100
commit24bbea7953af2990ae84fc1f88f32a1eb2736192 (patch)
tree8541bdf714e69368f4916176f62bdb622cccc241 /synapse/storage/events.py
parentRefactor `get_events_as_list` (#5699) (diff)
downloadsynapse-24bbea7953af2990ae84fc1f88f32a1eb2736192.tar.xz
Fix redaction authentication (#5700)
Ensures that redactions are correctly authenticated for recent room versions.

There are a few things going on here:

 * `_fetch_event_rows` is updated to return a dict rather than a list of rows.

 * Rather than returning multiple copies of an event which was redacted
   multiple times, it returns the redactions as a list within the dict.

 * It also returns the actual rejection reason, rather than merely the fact
   that it was rejected, so that we don't have to query the table again in
   `_get_event_from_row`.

 * The redaction handling is factored out of `_get_event_from_row`, and now
   checks if any of the redactions are valid.
Diffstat (limited to 'synapse/storage/events.py')
0 files changed, 0 insertions, 0 deletions