Skip to content

Commit

Permalink
Fixes matrix-org#12277 :Disable sending confirmation email when 3pid …
Browse files Browse the repository at this point in the history
…is disabled
  • Loading branch information
JeyRathnam committed Dec 16, 2022
1 parent 54c012c commit 5e5725d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions synapse/rest/client/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ def __init__(self, hs: "HomeServer"):
)

async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
if not self.hs.config.registration.enable_3pid_changes:
raise SynapseError(
400, "3PID changes are disabled on this server", Codes.FORBIDDEN
)

if not self.config.email.can_verify_email:
logger.warning(
"Adding emails have been disabled due to lack of an email config"
Expand Down

0 comments on commit 5e5725d

Please sign in to comment.