summary refs log tree commit diff
path: root/synapse/event_auth.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix error handling for missing auth_eventRichard van der Hoff2018-09-261-2/+2
| | | | | | | | | | When we were authorizing an event, if there was no `m.room.create` in its auth_events, we would raise a SynapseError with a cryptic message, which then meant that we would bail out of processing any incoming events, rather than storing a rejection for the faulty event and moving on. We should treat the absent event the same as any other auth failure, by raising an AuthError, so that the event is marked as rejected.
* Check m.room.create for sane room_versionsRichard van der Hoff2018-08-061-1/+9
|
* run isortAmber Brown2018-07-091-3/+3
|
* Avoid relying on int vs None comparisonErik Johnston2018-07-021-1/+5
| | | | Python 3 doesn't support comparing None to ints
* Ensure that we define sender_domainErik Johnston2018-07-021-0/+1
|
* Make default state_default 50Richard van der Hoff2018-06-141-20/+14
| | | | | | | Make it so that, before there is a power-levels event in the room, you need a power level of at least 50 to send state. Partially addresses https://github.com/matrix-org/matrix-doc/issues/1192
* Clarify interface for event_authRichard van der Hoff2018-06-141-18/+16
| | | | | stop pretending that it returns a boolean, which just almost gave me a heart attack.
* Refactor get_send_level to take a power_levels eventRichard van der Hoff2018-06-141-7/+38
| | | | it makes it easier for me to reason about
* Consistently use six's iteritems and wrap lazy keys/values in list() if ↵Amber Brown2018-05-311-2/+2
| | | | they're not meant to be lazy (#3307)
* Fix templating error with unban permission messageTravis Ralston2018-01-071-1/+1
| | | | | Fixes https://github.com/matrix-org/synapse/issues/2759 Signed-off-by: Travis Ralston <travpc@gmail.com>
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-2/+2
| | | | what could possibly go wrong
* Fix 500 error when fields missing from power_levels eventRichard van der Hoff2017-10-171-3/+3
| | | | | If the users or events keys were missing from a power_levels event, then we would throw 500s when trying to auth them.
* Use better variable nameErik Johnston2017-01-171-3/+3
|
* Optimise state resolutionErik Johnston2017-01-171-6/+43
|
* Split event auth code into seperate moduleErik Johnston2017-01-131-0/+641