summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-05-16 19:17:03 +0100
committerMark Haines <mark.haines@matrix.org>2016-05-16 19:17:23 +0100
commit1a3a2002ffc2569ec2afbbdfb110f94ce2728710 (patch)
treecefd66c66a12e650da9f90cdbeadb73c6e69edf8 /synapse/api/auth.py
parentMerge pull request #760 from matrix-org/matthew/preview_url_ip_whitelist (diff)
downloadsynapse-1a3a2002ffc2569ec2afbbdfb110f94ce2728710.tar.xz
Spell "domain" correctly
s/domian/domain/g
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 44e38b777a..2474a1453b 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -22,7 +22,7 @@ from twisted.internet import defer
 
 from synapse.api.constants import EventTypes, Membership, JoinRules
 from synapse.api.errors import AuthError, Codes, SynapseError, EventSizeError
-from synapse.types import Requester, UserID, get_domian_from_id
+from synapse.types import Requester, UserID, get_domain_from_id
 from synapse.util.logutils import log_function
 from synapse.util.logcontext import preserve_context_over_fn
 from synapse.util.metrics import Measure
@@ -91,8 +91,8 @@ class Auth(object):
                     "Room %r does not exist" % (event.room_id,)
                 )
 
-            creating_domain = get_domian_from_id(event.room_id)
-            originating_domain = get_domian_from_id(event.sender)
+            creating_domain = get_domain_from_id(event.room_id)
+            originating_domain = get_domain_from_id(event.sender)
             if creating_domain != originating_domain:
                 if not self.can_federate(event, auth_events):
                     raise AuthError(
@@ -219,7 +219,7 @@ class Auth(object):
         for event in curr_state.values():
             if event.type == EventTypes.Member:
                 try:
-                    if get_domian_from_id(event.state_key) != host:
+                    if get_domain_from_id(event.state_key) != host:
                         continue
                 except:
                     logger.warn("state_key not user_id: %s", event.state_key)
@@ -266,8 +266,8 @@ class Auth(object):
 
         target_user_id = event.state_key
 
-        creating_domain = get_domian_from_id(event.room_id)
-        target_domain = get_domian_from_id(target_user_id)
+        creating_domain = get_domain_from_id(event.room_id)
+        target_domain = get_domain_from_id(target_user_id)
         if creating_domain != target_domain:
             if not self.can_federate(event, auth_events):
                 raise AuthError(
@@ -890,8 +890,8 @@ class Auth(object):
         if user_level >= redact_level:
             return False
 
-        redacter_domain = get_domian_from_id(event.event_id)
-        redactee_domain = get_domian_from_id(event.redacts)
+        redacter_domain = get_domain_from_id(event.event_id)
+        redactee_domain = get_domain_from_id(event.redacts)
         if redacter_domain == redactee_domain:
             return True