diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-07-15 18:58:25 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-07-15 18:58:25 +0100 |
commit | d137e03231fbe29d7100cd2e3e8683d7681e2208 (patch) | |
tree | 3a85c5e9aad2d7dc1f5ca47989ba8c530b05e22c /synapse | |
parent | Merge pull request #923 from matrix-org/erikj/purge_history (diff) | |
download | synapse-d137e03231fbe29d7100cd2e3e8683d7681e2208.tar.xz |
Fix 500 ISE when sending alias event without a state_key
Diffstat (limited to '')
-rw-r--r-- | synapse/api/auth.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 3d1ce4e09e..be67ab4f4d 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -121,6 +121,11 @@ class Auth(object): # FIXME: Temp hack if event.type == EventTypes.Aliases: + if not event.is_state(): + raise AuthError( + 403, + "Alias event must be a state event", + ) if not event.state_key: raise AuthError( 403, |