diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-06-25 11:05:52 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-06-25 11:05:52 +0100 |
commit | af21fbb33824977a392ffc4c7875b800901a3328 (patch) | |
tree | 22f5039752a9387b28bb3d85df5fc6ffdf34c897 | |
parent | Explain why we rate-limit using a threepid (diff) | |
download | synapse-af21fbb33824977a392ffc4c7875b800901a3328.tar.xz |
Simplify medium and address assignment
-rw-r--r-- | synapse/rest/client/v1/login.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index 98a3365f05..b90ad6d79e 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -144,10 +144,8 @@ class LoginRestServlet(RestServlet): # Check whether this attempt uses a threepid, if so, check if our failed attempt # ratelimiter allows another attempt at this time - medium, address = ( - login_submission.get("medium"), - login_submission.get("address"), - ) + medium = login_submission.get("medium") + address = login_submission.get("address") if medium and address: self._failed_attempts_ratelimiter.ratelimit( (medium, address.lower()), update=False |