mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-28 13:11:56 +00:00
move guard out of is_threepid_reserved and into register.py
This commit is contained in:
parent
d619b113ed
commit
c99c2d58d7
@ -1 +1 @@
|
|||||||
Fix None guard in config.server.is_threepid_reserved
|
Fix None guard in calling config.server.is_threepid_reserved
|
||||||
|
@ -429,8 +429,6 @@ def is_threepid_reserved(reserved_threepids, threepid):
|
|||||||
Returns:
|
Returns:
|
||||||
boolean Is the threepid undertest reserved_user
|
boolean Is the threepid undertest reserved_user
|
||||||
"""
|
"""
|
||||||
if not threepid:
|
|
||||||
return False
|
|
||||||
|
|
||||||
for tp in reserved_threepids:
|
for tp in reserved_threepids:
|
||||||
if (threepid['medium'] == tp['medium'] and threepid['address'] == tp['address']):
|
if (threepid['medium'] == tp['medium'] and threepid['address'] == tp['address']):
|
||||||
|
@ -416,6 +416,7 @@ class RegisterRestServlet(RestServlet):
|
|||||||
)
|
)
|
||||||
# Necessary due to auth checks prior to the threepid being
|
# Necessary due to auth checks prior to the threepid being
|
||||||
# written to the db
|
# written to the db
|
||||||
|
if threepid:
|
||||||
if is_threepid_reserved(
|
if is_threepid_reserved(
|
||||||
self.hs.config.mau_limits_reserved_threepids, threepid
|
self.hs.config.mau_limits_reserved_threepids, threepid
|
||||||
):
|
):
|
||||||
|
Loading…
Reference in New Issue
Block a user