diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-09-29 15:59:54 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-09-29 15:59:54 +0100 |
commit | 91d309397d20fa3c43e7f779967095345fa70b82 (patch) | |
tree | b87f0394a588ef84593ad6d8439ff01d8ffd47e1 | |
parent | Merge remote-tracking branch 'origin/anoa/info-mainline-no-check-password-res... (diff) | |
download | synapse-91d309397d20fa3c43e7f779967095345fa70b82.tar.xz |
Add some logging around checking 3PIDs are allowed
-rw-r--r-- | synapse/util/threepids.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/util/threepids.py b/synapse/util/threepids.py index bd63b9107e..c7459802fd 100644 --- a/synapse/util/threepids.py +++ b/synapse/util/threepids.py @@ -39,6 +39,10 @@ async def check_3pid_allowed(hs, medium, address): ), {'medium': medium, 'address': address} ) + logger.info( + "Received internal-info data for medium '%s', address '%s': %s", + medium, address, data, + ) # Check for invalid response if 'hs' not in data and 'shadow_hs' not in data: @@ -49,10 +53,19 @@ async def check_3pid_allowed(hs, medium, address): data.get('hs') != hs.config.server_name and data.get('shadow_hs') != hs.config.server_name ): + logger.info( + "%s did not match %s or %s did not match %s", + data.get("hs"), hs.config.server_name, + data.get("shadow_hs"), hs.config.server_name, + ) return False if data.get('requires_invite', False) and not data.get('invited', False): # Requires an invite but hasn't been invited + logger.info( + "3PID check failed due to 'required_invite' = '%s' and 'invited' = '%s'", + data.get('required_invite'), data.get("invited"), + ) return False return True |