mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:16:07 -04:00
Use direct references for configuration variables (part 6). (#10916)
This commit is contained in:
parent
8cef1ab2ac
commit
94b620a5ed
54 changed files with 141 additions and 132 deletions
|
@ -119,7 +119,7 @@ class EmailPasswordRequestTokenRestServlet(RestServlet):
|
|||
)
|
||||
|
||||
if existing_user_id is None:
|
||||
if self.config.request_token_inhibit_3pid_errors:
|
||||
if self.config.server.request_token_inhibit_3pid_errors:
|
||||
# Make the client think the operation succeeded. See the rationale in the
|
||||
# comments for request_token_inhibit_3pid_errors.
|
||||
# Also wait for some random amount of time between 100ms and 1s to make it
|
||||
|
@ -403,7 +403,7 @@ class EmailThreepidRequestTokenRestServlet(RestServlet):
|
|||
existing_user_id = await self.store.get_user_id_by_threepid("email", email)
|
||||
|
||||
if existing_user_id is not None:
|
||||
if self.config.request_token_inhibit_3pid_errors:
|
||||
if self.config.server.request_token_inhibit_3pid_errors:
|
||||
# Make the client think the operation succeeded. See the rationale in the
|
||||
# comments for request_token_inhibit_3pid_errors.
|
||||
# Also wait for some random amount of time between 100ms and 1s to make it
|
||||
|
@ -486,7 +486,7 @@ class MsisdnThreepidRequestTokenRestServlet(RestServlet):
|
|||
existing_user_id = await self.store.get_user_id_by_threepid("msisdn", msisdn)
|
||||
|
||||
if existing_user_id is not None:
|
||||
if self.hs.config.request_token_inhibit_3pid_errors:
|
||||
if self.hs.config.server.request_token_inhibit_3pid_errors:
|
||||
# Make the client think the operation succeeded. See the rationale in the
|
||||
# comments for request_token_inhibit_3pid_errors.
|
||||
# Also wait for some random amount of time between 100ms and 1s to make it
|
||||
|
@ -857,8 +857,8 @@ def assert_valid_next_link(hs: "HomeServer", next_link: str) -> None:
|
|||
# If the domain whitelist is set, the domain must be in it
|
||||
if (
|
||||
valid
|
||||
and hs.config.next_link_domain_whitelist is not None
|
||||
and next_link_parsed.hostname not in hs.config.next_link_domain_whitelist
|
||||
and hs.config.server.next_link_domain_whitelist is not None
|
||||
and next_link_parsed.hostname not in hs.config.server.next_link_domain_whitelist
|
||||
):
|
||||
valid = False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue