Only allow people to set the alias list for their own domain.

This commit is contained in:
Erik Johnston 2015-09-01 15:51:43 +01:00
parent 24a5a8a118
commit 530896d9d2

View file

@ -83,7 +83,12 @@ class Auth(object):
# FIXME: Temp hack
if event.type == EventTypes.Aliases:
return True
alias_domain = UserID.from_string(event.state_key).domain
if alias_domain != originating_domain:
raise AuthError(
403,
"Can only set aliases for own domain"
)
logger.debug(
"Auth events: %s",